Skip to content

Commit

Permalink
add tests for strings and escape sequences
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Sevilla committed Dec 5, 2014
1 parent 9f7f29b commit 358b745
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion arc/tests/compiler/reader-test.arc
Original file line number Diff line number Diff line change
Expand Up @@ -167,5 +167,16 @@
("Read characters"
(w/instring fp "(#\\a #\\b #\\c #\\nul #\\backspace #\\tab #\\newline #\\linefeed #\\vtab #\\page #\\return #\\space #\\rubout #\\377 #\\u9f8d #\\龍)" (zread fp))
(#\a #\b #\c #\nul #\backspace #\tab #\newline #\linefeed #\vtab #\page #\return #\space #\rubout #\377 #\u9f8d #\龍))


("Read a string"
(w/instring fp "\"cwm fjord bank glyphs vext quiz 龍\\a\\b\\t\\n\\v\\f\\r\\e\\\"\\'\\\\\"" (zread fp))
"cwm fjord bank glyphs vext quiz 龍\a\b\t\n\v\f\r\e\"\'\\")

("Octal escape sequences"
(w/instring fp "\"\\377\1234\\728\"" (zread fp))
"\377S4:8")

("Unicode escape sequences"
(w/instring fp "\"\\u9f8dd\u1d107\U1d107\U00009f8de\"" (zread fp))
"龍dᴐ7𝄇龍e")
))

0 comments on commit 358b745

Please sign in to comment.