-
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 start unit testing the EDE implementation
- Loading branch information
Matthew O. Smith
committed
Jun 29, 2015
1 parent
736dcda
commit 0620ead
Showing
5 changed files
with
103 additions
and
71 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
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,45 @@ | ||
;;; -*- 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. | ||
;; | ||
|
||
|
||
(setq java-file "src/test/project/basic/src/main/java/com/software_ninja/App.java") | ||
|
||
|
||
(defun malabar-ede-maven-project-dir () | ||
(if noninteractive | ||
(getenv "PWD") | ||
(expand-file-name "../../.."))) | ||
|
||
|
||
|
||
(ert-deftest malabar-ede-maven-doh () | ||
(should (= 1 1))) | ||
|
||
|
||
(ert-deftest malabar-ede-maven-classpath () | ||
(with-temp-buffer | ||
(require 'malabar-ede-maven) | ||
(let ((file-name (expand-file-name java-file (malabar-ede-maven-project-dir)))) | ||
(insert-file-contents-literally file-name) | ||
(setq buffer-file-name file-name) | ||
(setq default-directory (file-name-directory file-name)) | ||
(java-mode) | ||
(malabar-java-mode) | ||
(should (equal "hasmter" (aref (ede-current-project) 2)))))) | ||
|
This file was deleted.
Oops, something went wrong.
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,48 @@ | ||
;;; -*- 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. | ||
;; | ||
|
||
|
||
(setq java-file "src/test/project/basic/src/main/java/com/software_ninja/App.java") | ||
|
||
|
||
(defun malabar-mode-project-dir () | ||
(if noninteractive | ||
(getenv "PWD") | ||
(expand-file-name "../../.."))) | ||
|
||
|
||
|
||
(ert-deftest malabar-mode-doh () | ||
(should (= 1 1))) | ||
|
||
|
||
(ert-deftest malabar-mode-classpath () | ||
(with-temp-buffer | ||
(let ((file-name (expand-file-name java-file (malabar-mode-project-dir)))) | ||
(insert-file-contents-literally file-name) | ||
(setq buffer-file-name file-name) | ||
(setq default-directory (file-name-directory file-name)) | ||
(java-mode) | ||
(malabar-java-mode) | ||
(should (equal "maven" malabar-mode-project-manager)) | ||
(should (equal "java" malabar-mode-project-parser)) | ||
(should (equal (expand-file-name "src/test/project/basic/" (malabar-mode-project-dir)) | ||
(expand-file-name malabar-mode-project-dir))) | ||
(should (equal "basic" malabar-mode-project-name))))) | ||
|