www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

test-unsyntax2.rkt (564B)


      1 #lang racket
      2 (require subtemplate/override
      3          rackunit)
      4 
      5 (check-equal? (syntax->datum
      6                (quasitemplate (a b #,(+ 1 1) c)))
      7               '(a b 2 c))
      8 
      9 (check-equal? (syntax->datum
     10                (template (a b #,(+ 1 1) c)))
     11               (let ([u 'unsyntax])
     12                 `(a b (,u (+ 1 1)) c)))
     13 
     14 (check-equal? (syntax->datum
     15                (quasitemplate (a b #,@(list (?@ 1 2) (?@ 3 4)) c)))
     16               '(a b 1 2 3 4 c))
     17 
     18 (check-equal? (syntax->datum
     19                #`(a b #,@(list (?@ 1 2) (?@ 3 4)) c))
     20               '(a b 1 2 3 4 c))