diff --git a/test/it-test.rkt b/test/it-test.rkt index 2ac7872..1ad2dac 100644 --- a/test/it-test.rkt +++ b/test/it-test.rkt @@ -1,8 +1,18 @@ #lang racket -(require anaphoric/it - rackunit - syntax/macro-testing) +(require (for-syntax racket)) +(define-syntax (when-≥-6.3 stx) + (syntax-case stx () + [(_ . body) + (if (let ([v (map string->number (string-split (version) "."))]) + (and (>= (first v) 6) (>= (second v) 3))) + (syntax/loc stx (begin . body)) + (syntax/loc stx (begin)))])) -(check-exn #rx"Use of the \"it\" identifier is only allowed within anaphoric macros\\." - (lambda () (convert-compile-time-error it))) +(when-≥-6.3 + (require anaphoric/it + rackunit + syntax/macro-testing) + + (check-exn #rx"Use of the \"it\" identifier is only allowed within anaphoric macros\\." + (lambda () (convert-compile-time-error it)))) \ No newline at end of file