From 3244170ccae9d5520f2dc016859b1717cf1d93cc Mon Sep 17 00:00:00 2001 From: Suzanne Soy Date: Sat, 27 Feb 2021 16:22:23 +0000 Subject: [PATCH] Disable test which needs convert-compile-time-error in Racket < 6.3 --- test/it-test.rkt | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) 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