blob: ca7cbcb248cf10069299a06ca9da2a9989bf5890 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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)))))
|