branch: elpa/cider
commit 22c773168e928299c66bee3340f1c52be4451bc6
Author: yuhan0 <[email protected]>
Commit: yuhan0 <[email protected]>

    Add test
---
 test/cider-error-parsing-tests.el | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/test/cider-error-parsing-tests.el 
b/test/cider-error-parsing-tests.el
index 4a887ac47a..8c01cd2c23 100644
--- a/test/cider-error-parsing-tests.el
+++ b/test/cider-error-parsing-tests.el
@@ -178,7 +178,16 @@
       (expect (progn
                 (string-match cider-clojure-runtime-error-regexp specimen)
                 (match-string 2 specimen))
-              :to-equal "src/haystack/parser.cljc"))))
+              :to-equal "src/haystack/parser.cljc")))
+
+  ;; Java source locations may be negative (#3687)
+  (it "Recognizes an error thrown from a java source file"
+    (let ((specimen "Execution error (FileNotFoundException) at 
java.io.FileInputStream/open0 (FileInputStream.java:-2)."))
+      (expect specimen :to-match cider-clojure-runtime-error-regexp)
+      (expect (progn
+                (string-match cider-clojure-runtime-error-regexp specimen)
+                (match-string 2 specimen))
+              :to-equal "FileInputStream.java"))))
 
 (describe "cider-module-info-regexp"
   (it "Matches module info provided by Java"

Reply via email to