Skip to content

Commit

Permalink
tests: improve consistency with the key not found error message
Browse files Browse the repository at this point in the history
Never require quotes around the symbol.
  • Loading branch information
asarhaddon committed Aug 7, 2024
1 parent 3b1b873 commit fa15c3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion impls/tests/step3_env.mal
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ MYNUM

;; Check env lookup non-fatal error
(abc 1 2 3)
;/.*\'?abc\'? not found.*
;/.*'?abc'? not found.*
;; Check that error aborts def!
(def! w 123)
(def! w (abc))
Expand Down
6 changes: 3 additions & 3 deletions impls/tests/step9_try.mal
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
;=>123

(try* abc (catch* exc (prn "exc is:" exc)))
;/"exc is:" "'abc' not found"
;/"exc is:" "'?abc'? not found"
;=>nil

(try* (abc 1 2) (catch* exc (prn "exc is:" exc)))
;/"exc is:" "'abc' not found"
;/"exc is:" "'?abc'? not found"
;=>nil

;; Make sure error from core can be caught
Expand Down Expand Up @@ -338,7 +338,7 @@
;;
;; Testing try* without catch*
(try* xyz)
;/.*\'?xyz\'? not found.*
;/.*'?xyz'? not found.*

;;
;; Testing throwing non-strings
Expand Down

0 comments on commit fa15c3e

Please sign in to comment.