Skip to content

Commit 2cdac01

Browse files
yuhan0bbatsov
authored andcommitted
Add test
1 parent 1180bb3 commit 2cdac01

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

test/cider-error-parsing-tests.el

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@
124124
(expect (progn (string-match cider-clojure-compilation-regexp clojure-compiler-warning)
125125
(match-string 1 clojure-compiler-warning))
126126
:to-equal "warning")))
127+
;; FIXME: duplicate spec names
127128
(dolist (regexp (list cider-clojure-compilation-regexp cider-clojure-compilation-error-regexp))
128129
(it "Recognizes a clojure-1.10 error message"
129130
(let ((clojure-1.10-compiler-error "Syntax error compiling at (src/ardoq/service/workspace_service.clj:227:3)."))
@@ -156,7 +157,7 @@
156157
(match-string 2 specimen))
157158
:to-equal "src/haystack/parser.cljc"))
158159

159-
;; without foo/foo symbol
160+
;; without exception class cause-type
160161
(let ((specimen "Execution error at (src/haystack/parser.cljc:4)."))
161162
(expect specimen :to-match cider-clojure-runtime-error-regexp)
162163
(expect (progn
@@ -187,7 +188,15 @@
187188
(expect (progn
188189
(string-match cider-clojure-runtime-error-regexp specimen)
189190
(match-string 2 specimen))
190-
:to-equal "FileInputStream.java"))))
191+
:to-equal "FileInputStream.java")))
192+
193+
(it "Recognizes errors thrown during the result printing phase"
194+
(let ((specimen "Error printing return value (ClassCastException) at clojure.core/file-seq$fn (core.clj:4997)."))
195+
(expect specimen :to-match cider-clojure-runtime-error-regexp)
196+
(expect (progn
197+
(string-match cider-clojure-runtime-error-regexp specimen)
198+
(match-string 2 specimen))
199+
:to-equal "core.clj"))))
191200

192201
(describe "cider-module-info-regexp"
193202
(it "Matches module info provided by Java"

0 commit comments

Comments
 (0)