-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-177 unit testing the new CEDET version
- Loading branch information
Matthew O. Smith
committed
Jun 28, 2015
1 parent
c61f92b
commit 736dcda
Showing
8 changed files
with
169 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
### Makefile for malabar-mode | ||
## | ||
## Copyright (c) 2009, 2010 Espen Wiborg <[email protected]> | ||
## | ||
## This program is free software; you can redistribute it and/or | ||
## modify it under the terms of the GNU General Public License as | ||
## published by the Free Software Foundation; either version 2 of the | ||
## License, or (at your option) any later version. | ||
## | ||
## This program is distributed in the hope that it will be useful, but | ||
## WITHOUT ANY WARRANTY; without even the implied warranty of | ||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
## General Public License for more details. | ||
## | ||
## You should have received a copy of the GNU General Public License | ||
## along with this program; if not, write to the Free Software | ||
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
## 02110-1301 USA. | ||
## | ||
|
||
EMACS=emacs | ||
|
||
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) | ||
mkfile_dir := $(dir $(mkfile_path)) | ||
|
||
all: testr | ||
|
||
testr: | ||
# cd $(mkfile_dir) && $(EMACS) -Q --batch -l src/test/lisp/init.el -l src/test/lisp/all-tests.el | ||
cd $(mkfile_dir) && $(EMACS) -Q --batch -f toggle-debug-on-error -l src/test/lisp/init.el -l src/test/lisp/init-malabar.el -l src/test/lisp/all-tests.el | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(load-file "src/main/lisp/malabar-mode.el") | ||
(activate-malabar-mode) | ||
(malabar-run-groovy) | ||
|
||
(find-file "src/test/project/basic/src/main/java/com/software_ninja/App.java") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
;;; -*- emacs-lisp -*- | ||
;; Copyright (c) 2009 Espen Wiborg <[email protected]> | ||
;; | ||
;; This program is free software; you can redistribute it and/or | ||
;; modify it under the terms of the GNU General Public License as | ||
;; published by the Free Software Foundation; either version 2 of the | ||
;; License, or (at your option) any later version. | ||
;; | ||
;; This program is distributed in the hope that it will be useful, but | ||
;; WITHOUT ANY WARRANTY; without even the implied warranty of | ||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
;; General Public License for more details. | ||
;; | ||
;; You should have received a copy of the GNU General Public License | ||
;; along with this program; if not, write to the Free Software | ||
;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
;; 02110-1301 USA. | ||
;; | ||
|
||
;; Stub | ||
(provide 'semantic) | ||
|
||
(deftest "buffer name" | ||
(with-current-buffer (get-buffer "App.java") | ||
(assert-equal "App.java" (buffer-name)))) | ||
|
||
(deftest "malabar-project variable malabar-mode-project-name" | ||
(with-current-buffer (get-buffer "App.java") | ||
(assert-equal "basic" malabar-mode-project-name))) | ||
|
||
(deftest "malabar-project variable malabar-mode-project-manager" | ||
(with-current-buffer (get-buffer "App.java") | ||
(assert-equal "maven" malabar-mode-project-manager))) | ||
|
||
(deftest "malabar-project variable malabar-mode-project-dir" | ||
(with-current-buffer (get-buffer "App.java") | ||
(assert-equal (expand-file-name "src/test/project/basic/" (getenv "PWD")) | ||
(expand-file-name malabar-mode-project-dir)))) | ||
|
||
(deftest "malabar-project variable malabar-mode-project-parser" | ||
(with-current-buffer (get-buffer "App.java") | ||
(assert-equal "java" malabar-mode-project-parser))) | ||
|
||
|
||
|
||
|
||
(deftest "malabar-fully-qualified-class-name-kill-ring-save" | ||
(with-current-buffer (get-buffer "App.java") | ||
(assert-equal "Copied com.software_ninja.App" (malabar-fully-qualified-class-name-kill-ring-save)))) | ||
|
||
|
||
;;; | ||
;;; HTTP Stuff | ||
;;; | ||
|
||
(deftest "malabar-http-compile-file App.java" | ||
(with-current-buffer (get-buffer "App.java") | ||
(let ((result-buffer (malabar-http-compile-file))) | ||
(with-current-buffer result-buffer | ||
(assert-equal "" (buffer-string)))))) | ||
|
||
|
||
(deftest "malabar-http-compile-file App.java fail" | ||
(with-current-buffer (get-buffer "App.java") | ||
|
||
(let ((result-buffer (malabar-http-compile-file))) | ||
(with-current-buffer result-buffer | ||
(assert-equal "" (buffer-string)))))) |