kzccm1d4if10m2xaz1wqy3xar821pp1r-my-site-anaphoric-git.test.suzanne.soy-0.0.1

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

it-test.rkt (554B)


      1 #lang racket
      2 
      3 (require (for-syntax racket))
      4 (define-syntax (when-≥-6.3 stx)
      5   (syntax-case stx ()
      6     [(_ . body)
      7      (if (let ([v (map string->number (string-split (version) "."))])
      8            (and (>= (first v) 6) (>= (second v) 3)))
      9          (syntax/loc stx (begin . body))
     10          (syntax/loc stx (begin)))]))
     11 
     12 (when-≥-6.3
     13  (require anaphoric/it
     14           rackunit
     15           syntax/macro-testing)
     16 
     17  (check-exn #rx"Use of the \"it\" identifier is only allowed within anaphoric macros\\."
     18             (lambda () (convert-compile-time-error it))))