Skip to content

Commit

Permalink
Add reference tests to parser tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ambrevar committed Feb 16, 2021
1 parent 3ef811c commit b80c0da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions t/parser.lisp
Expand Up @@ -8,9 +8,13 @@
(plan nil)

(subtest "parser string bounds"
(is (nth-value 0 (parse-uri "foo://bar")) "foo")
(is (nth-value 0 (parse-uri "foo://bar" :start 4)) nil)
(is (nth-value 4 (parse-uri "foo://bar/xyz?a=b#c")) "/xyz")
(is (nth-value 4 (parse-uri "foo://bar/xyz?a=b#c" :end 12)) "/xy")
(is (nth-value 5 (parse-uri "foo://bar/xyz?a=b#c")) "a=b")
(is (nth-value 5 (parse-uri "foo://bar/xyz?a=b#c" :end 13)) nil)
(is (nth-value 6 (parse-uri "foo://bar/xyz?a=b#c")) "c")
(is (nth-value 6 (parse-uri "foo://bar/xyz?a=b#c" :end 17)) nil))

(finalize)

0 comments on commit b80c0da

Please sign in to comment.