aboutsummaryrefslogtreecommitdiff
path: root/tests/test/cpp/lex2.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test/cpp/lex2.scm')
-rw-r--r--tests/test/cpp/lex2.scm12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test/cpp/lex2.scm b/tests/test/cpp/lex2.scm
index b80bcf37..47bb4a16 100644
--- a/tests/test/cpp/lex2.scm
+++ b/tests/test/cpp/lex2.scm
@@ -80,3 +80,15 @@
(lexeme type: 'whitespace body: "\n")
(lexeme type: 'whitespace body: " "))
(lex " \n "))
+
+
+;; Refer to 6.4 p.1 for the syntax requirement
+;; 6.10.9 p. 2 for the sample string
+(test-equal "each non-white-space character that cannot be one of the above"
+ (list (lexeme type: 'preprocessing-token body: '(punctuator "."))
+ (lexeme type: 'preprocessing-token body: '(punctuator "."))
+ (lexeme type: 'other body: "\\") ; <- Interesting part
+ (lexeme type: 'preprocessing-token body: '(identifier "listing"))
+ (lexeme type: 'preprocessing-token body: '(punctuator "."))
+ (lexeme type: 'preprocessing-token body: '(identifier "dir")))
+ (lex "..\\listing.dir"))