Disable test which needs convert-compile-time-error in Racket < 6.3

This commit is contained in:
Suzanne Soy 2021-02-27 16:22:23 +00:00
parent cac2bf9928
commit 3244170cca

View File

@ -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))))