Skip to content

Commit

Permalink
Don't qualify test class names for Maven
Browse files Browse the repository at this point in the history
  • Loading branch information
espenhw committed Mar 17, 2009
1 parent e79d116 commit 66754f2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/lisp/malabar-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,26 @@
(or (locate-file class-file test-source-directories)
(expand-file-name class-file (car test-source-directories))))))))

(defun malabar-run-test-internal (test-starter)
(defun malabar-run-test-internal (test-starter &optional requires-qualification)
(with-current-buffer (malabar-visit-corresponding-test (current-buffer) t)
(malabar-setup-compilation-buffer)
(setq malabar-compilation-project-test-source-directories
(malabar-project-test-source-directories malabar-compilation-project-file))
(display-buffer malabar-groovy-compilation-buffer-name t)
(malabar-groovy-eval-as-compilation
(format test-starter
(malabar-qualified-class-name-of-buffer (current-buffer))))))
(if requires-qualification
(malabar-qualified-class-name-of-buffer (current-buffer))
(malabar-unqualified-class-name-of-buffer (current-buffer)))))))

(defun malabar-run-junit-test ()
"Runs the current buffer (or its corresponding test) as a
standalone JUnit test."
(interactive)
(malabar-run-test-internal
(format "%s.runJunit('%%s')"
(malabar-project (current-buffer)))))
(malabar-project (current-buffer)))
t))

(defun malabar-run-test ()
"Runs the current buffer (or its corresponding test) as a test,
Expand Down

0 comments on commit 66754f2

Please sign in to comment.