commit 3244170ccae9d5520f2dc016859b1717cf1d93cc parent cac2bf99286b6452f8c0bd81406bec4a6929c50f Author: Suzanne Soy <ligo@suzanne.soy> Date: Sat, 27 Feb 2021 16:22:23 +0000 Disable test which needs convert-compile-time-error in Racket < 6.3 Diffstat:
| M | test/it-test.rkt | | | 21 | ++++++++++++++++----- |
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git 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