diff options
Diffstat (limited to 'tests/test/cpp.scm')
-rw-r--r-- | tests/test/cpp.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test/cpp.scm b/tests/test/cpp.scm index 2cb4266d..2c51f616 100644 --- a/tests/test/cpp.scm +++ b/tests/test/cpp.scm @@ -412,6 +412,14 @@ num)) (run form)))) +(test-group "Characters" + (let ((form "'c'")) + (test-equal '(char "c") (lex form)) + (test-equal #x63 (run form))) + + (let ((form "'\\n'")) + (test-equal '(char (escaped-char "n")) (lex form)) + (test-equal (char->integer #\newline) (run form)))) (test-group "Strings" (test-group "Empty string" |