aboutsummaryrefslogtreecommitdiff
path: root/tests/test/cpp/preprocessor2.scm
blob: 117b7e493dd4a5c4a46daf8d926d327f6fd0ff07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
(define-module (test cpp preprocessor2)
  :use-module (srfi srfi-64)
  :use-module (srfi srfi-88))



(test-group "Tokens until End Of Line"
 (call-with-values
     (lambda ()
       (tokens-until-eol
        '(before (whitespace "\n") after)))
   (lambda (bef aft)
     (test-equal '(before) bef)
     (test-equal '((whitespace "\n") after) aft))))



(test-equal "Squeeze whitespace"
    '(bef (whitespace " ") aft)
  (squeeze-whitespace
   '(bef
     (whitespace a)
     (whitespace b)
     aft)))



(test-equal "("
  (stringify-token '(preprocessor-token (operator "("))))