Skip to content

Commit

Permalink
Add tests for quoted?
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramarren committed Mar 2, 2012
1 parent a386665 commit 1793a14
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test-parsers.lisp
Expand Up @@ -293,3 +293,16 @@
(defparsertest test-curtail? (curtail? e (choice (seq-list? e #\+ e) #\A))
("A" #\A "A+A" '(#\A #\+ #\A) "A+A+A" '((#\A #\+ #\A) #\+ #\A))
())

(defparsertest test-quoted? (quoted? :quote-char #\' :escape-char #\- :include-quotes t)
("'AAA'" "'AAA'" "'AB-'C'" "'AB-'C'")
("AAA"))

(defparsertest test-quoted?2 (quoted? :quote-char #\' :escape-char #\- :include-quotes nil)
("'AAA'" "AAA" "'AB-'C'" "AB'C")
("AAA"))

(defparsertest test-quoted?3 (quoted? :left-quote-char #\1 :right-quote-char #\2 :escape-char #\3 :include-quotes nil)
("1AAA2" "AAA" "1AB32C2" "AB2C")
("AAA"))

0 comments on commit 1793a14

Please sign in to comment.