summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/cider-error-parsing-tests.el69
-rw-r--r--test/cider-tests.el68
2 files changed, 69 insertions, 68 deletions
diff --git a/test/cider-error-parsing-tests.el b/test/cider-error-parsing-tests.el
new file mode 100644
index 00000000..ca7cbcb2
--- /dev/null
+++ b/test/cider-error-parsing-tests.el
@@ -0,0 +1,69 @@
+(require 'cider)
+
+(ert-deftest test-cider-extract-error-info-14 ()
+ (let ((message "CompilerException java.lang.RuntimeException: Unable to resolve symbol: dummy in this context, compiling:(/some/test/file/core.clj:31)"))
+ (let ((info (cider-extract-error-info cider-compilation-regexp message)))
+ (should (string= (nth 0 info) "/some/test/file/core.clj"))
+ (should (= (nth 1 info) 31))
+ (should (equal (nth 2 info) nil))
+ (should (equal (nth 3 info) 'cider-error-highlight-face)))))
+
+(ert-deftest test-cider-extract-error-info-14-no-file ()
+ (let ((message "CompilerException java.lang.RuntimeException: Unable to resolve symbol: dummy in this context, compiling:(NO_SOURCE_PATH:31)"))
+ (let ((info (cider-extract-error-info cider-compilation-regexp message)))
+ (should (equal (nth 0 info) nil))
+ (should (= (nth 1 info) 31))
+ (should (equal (nth 2 info) nil))
+ (should (equal (nth 3 info) 'cider-error-highlight-face)))))
+
+(ert-deftest test-cider-extract-warning-info-14 ()
+ (let ((message "Reflection warning, /some/othertest/file/core.clj:24 - reference to field getCanonicalPath can't be resolved.
+"))
+ (let ((info (cider-extract-error-info cider-compilation-regexp message)))
+ (should (string= (nth 0 info) "/some/othertest/file/core.clj"))
+ (should (= (nth 1 info) 24))
+ (should (equal (nth 2 info) nil))
+ (should (equal (nth 3 info) 'cider-warning-highlight-face)))))
+
+(ert-deftest test-cider-extract-warning-info-14-no-file ()
+ (let ((message "Reflection warning, NO_SOURCE_PATH:24 - reference to field getCanonicalPath can't be resolved.
+"))
+ (let ((info (cider-extract-error-info cider-compilation-regexp message)))
+ (should (equal (nth 0 info) nil))
+ (should (= (nth 1 info) 24))
+ (should (equal (nth 2 info) nil))
+ (should (equal (nth 3 info) 'cider-warning-highlight-face)))))
+
+(ert-deftest test-cider-extract-error-info-15 ()
+ (let ((message "CompilerException java.lang.RuntimeException: Unable to resolve symbol: dummy in this context, compiling:(/some/test/file/core.clj:31:3)"))
+ (let ((info (cider-extract-error-info cider-compilation-regexp message)))
+ (should (string= (nth 0 info) "/some/test/file/core.clj"))
+ (should (= (nth 1 info) 31))
+ (should (= (nth 2 info) 3))
+ (should (equal (nth 3 info) 'cider-error-highlight-face)))))
+
+(ert-deftest test-cider-extract-error-info-15-no-file ()
+ (let ((message "CompilerException java.lang.RuntimeException: Unable to resolve symbol: dummy in this context, compiling:(NO_SOURCE_PATH:31:3)"))
+ (let ((info (cider-extract-error-info cider-compilation-regexp message)))
+ (should (equal (nth 0 info) nil))
+ (should (= (nth 1 info) 31))
+ (should (= (nth 2 info) 3))
+ (should (equal (nth 3 info) 'cider-error-highlight-face)))))
+
+(ert-deftest test-cider-extract-warning-info-15 ()
+ (let ((message "Reflection warning, /some/othertest/file/core.clj:24:43 - reference to field getCanonicalPath can't be resolved.
+"))
+ (let ((info (cider-extract-error-info cider-compilation-regexp message)))
+ (should (string= (nth 0 info) "/some/othertest/file/core.clj"))
+ (should (= (nth 1 info) 24))
+ (should (= (nth 2 info) 43))
+ (should (equal (nth 3 info) 'cider-warning-highlight-face)))))
+
+(ert-deftest test-cider-extract-warning-info-15-no-file ()
+ (let ((message "Reflection warning, NO_SOURCE_PATH:24:43 - reference to field getCanonicalPath can't be resolved.
+"))
+ (let ((info (cider-extract-error-info cider-compilation-regexp message)))
+ (should (equal (nth 0 info) nil))
+ (should (= (nth 1 info) 24))
+ (should (= (nth 2 info) 43))
+ (should (equal (nth 3 info) 'cider-warning-highlight-face)))))
diff --git a/test/cider-tests.el b/test/cider-tests.el
index dbcbf158..854c054c 100644
--- a/test/cider-tests.el
+++ b/test/cider-tests.el
@@ -51,74 +51,6 @@
(cider--backend-version () "0.2.1"))
(should (equal (cider--banner) "; CIDER 0.2.0 (Clojure 1.5.1, nREPL 0.2.1)"))))
-(ert-deftest test-cider-extract-error-info-14 ()
- (let ((message "CompilerException java.lang.RuntimeException: Unable to resolve symbol: dummy in this context, compiling:(/some/test/file/core.clj:31)"))
- (let ((info (cider-extract-error-info cider-compilation-regexp message)))
- (should (string= (nth 0 info) "/some/test/file/core.clj"))
- (should (= (nth 1 info) 31))
- (should (equal (nth 2 info) nil))
- (should (equal (nth 3 info) 'cider-error-highlight-face)))))
-
-(ert-deftest test-cider-extract-error-info-14-no-file ()
- (let ((message "CompilerException java.lang.RuntimeException: Unable to resolve symbol: dummy in this context, compiling:(NO_SOURCE_PATH:31)"))
- (let ((info (cider-extract-error-info cider-compilation-regexp message)))
- (should (equal (nth 0 info) nil))
- (should (= (nth 1 info) 31))
- (should (equal (nth 2 info) nil))
- (should (equal (nth 3 info) 'cider-error-highlight-face)))))
-
-(ert-deftest test-cider-extract-warning-info-14 ()
- (let ((message "Reflection warning, /some/othertest/file/core.clj:24 - reference to field getCanonicalPath can't be resolved.
-"))
- (let ((info (cider-extract-error-info cider-compilation-regexp message)))
- (should (string= (nth 0 info) "/some/othertest/file/core.clj"))
- (should (= (nth 1 info) 24))
- (should (equal (nth 2 info) nil))
- (should (equal (nth 3 info) 'cider-warning-highlight-face)))))
-
-(ert-deftest test-cider-extract-warning-info-14-no-file ()
- (let ((message "Reflection warning, NO_SOURCE_PATH:24 - reference to field getCanonicalPath can't be resolved.
-"))
- (let ((info (cider-extract-error-info cider-compilation-regexp message)))
- (should (equal (nth 0 info) nil))
- (should (= (nth 1 info) 24))
- (should (equal (nth 2 info) nil))
- (should (equal (nth 3 info) 'cider-warning-highlight-face)))))
-
-(ert-deftest test-cider-extract-error-info-15 ()
- (let ((message "CompilerException java.lang.RuntimeException: Unable to resolve symbol: dummy in this context, compiling:(/some/test/file/core.clj:31:3)"))
- (let ((info (cider-extract-error-info cider-compilation-regexp message)))
- (should (string= (nth 0 info) "/some/test/file/core.clj"))
- (should (= (nth 1 info) 31))
- (should (= (nth 2 info) 3))
- (should (equal (nth 3 info) 'cider-error-highlight-face)))))
-
-(ert-deftest test-cider-extract-error-info-15-no-file ()
- (let ((message "CompilerException java.lang.RuntimeException: Unable to resolve symbol: dummy in this context, compiling:(NO_SOURCE_PATH:31:3)"))
- (let ((info (cider-extract-error-info cider-compilation-regexp message)))
- (should (equal (nth 0 info) nil))
- (should (= (nth 1 info) 31))
- (should (= (nth 2 info) 3))
- (should (equal (nth 3 info) 'cider-error-highlight-face)))))
-
-(ert-deftest test-cider-extract-warning-info-15 ()
- (let ((message "Reflection warning, /some/othertest/file/core.clj:24:43 - reference to field getCanonicalPath can't be resolved.
-"))
- (let ((info (cider-extract-error-info cider-compilation-regexp message)))
- (should (string= (nth 0 info) "/some/othertest/file/core.clj"))
- (should (= (nth 1 info) 24))
- (should (= (nth 2 info) 43))
- (should (equal (nth 3 info) 'cider-warning-highlight-face)))))
-
-(ert-deftest test-cider-extract-warning-info-15-no-file ()
- (let ((message "Reflection warning, NO_SOURCE_PATH:24:43 - reference to field getCanonicalPath can't be resolved.
-"))
- (let ((info (cider-extract-error-info cider-compilation-regexp message)))
- (should (equal (nth 0 info) nil))
- (should (= (nth 1 info) 24))
- (should (= (nth 2 info) 43))
- (should (equal (nth 3 info) 'cider-warning-highlight-face)))))
-
(defmacro cider-test-with-buffers (buffer-names &rest body)
(lexical-let ((create (lambda (b) (list b `(generate-new-buffer " *temp*")))))
`(lexical-let (,@(mapcar create buffer-names))