Skip to content

Commit 22c7731

Browse files
committed
Add test
1 parent de162d5 commit 22c7731

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/cider-error-parsing-tests.el

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,16 @@
178178
(expect (progn
179179
(string-match cider-clojure-runtime-error-regexp specimen)
180180
(match-string 2 specimen))
181-
:to-equal "src/haystack/parser.cljc"))))
181+
:to-equal "src/haystack/parser.cljc")))
182+
183+
;; Java source locations may be negative (#3687)
184+
(it "Recognizes an error thrown from a java source file"
185+
(let ((specimen "Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2)."))
186+
(expect specimen :to-match cider-clojure-runtime-error-regexp)
187+
(expect (progn
188+
(string-match cider-clojure-runtime-error-regexp specimen)
189+
(match-string 2 specimen))
190+
:to-equal "FileInputStream.java"))))
182191

183192
(describe "cider-module-info-regexp"
184193
(it "Matches module info provided by Java"

0 commit comments

Comments
 (0)