Skip to content

Commit

Permalink
test: Improve test coverage for SHARPSIGN-S reader macro function
Browse files Browse the repository at this point in the history
  • Loading branch information
scymtym committed Aug 19, 2024
1 parent 02f82dd commit 28d2944
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/reader/macro-functions.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,9 @@ variant, that is STRICT-SHARPSIGN-S."
("#.(list 1)" nil nil eclector.reader:structure-type-name-is-not-a-symbol 9 1
eclector.reader:non-list-following-sharpsign-s)
("#.(list 'foo 1)" nil nil eclector.reader:slot-name-is-not-a-string-designator 14 1
eclector.reader:non-list-following-sharpsign-s))))
eclector.reader:non-list-following-sharpsign-s)
("#.'(a b 1 c 2)" nil nil (a b 1 c 2) nil nil
eclector.reader:non-list-following-sharpsign-s 13 1))))

(test sharpsign-p/smoke
"Smoke test for the SHARPSIGN-P reader macro function."
Expand Down
3 changes: 3 additions & 0 deletions test/reader/recover.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,15 @@
("#S(foo 1)" (eclector.reader:slot-name-is-not-a-string-designator
eclector.reader:no-slot-value-found)
(foo))
("#S(foo 1 2)" (eclector.reader:slot-name-is-not-a-string-designator) (foo))
("#S(foo :bar" (eclector.reader:end-of-input-before-slot-value) (foo))
("#S(foo :bar)" (eclector.reader:no-slot-value-found) (foo))
("#S(foo :bar 1" (eclector.reader:end-of-input-before-slot-name) (foo :bar 1))

("#1S(foo)" (eclector.reader:numeric-parameter-supplied-but-ignored) (foo))

("#S#.'(1)" (eclector.reader:structure-type-name-is-not-a-symbol) nil 8)

;; Recover from errors related to pathname literals
("#P" (eclector.reader:end-of-input-after-sharpsign-p) #P".")
("(#P)" (eclector.reader:namestring-must-follow-sharpsign-p) (#P"."))
Expand Down

0 comments on commit 28d2944

Please sign in to comment.