From 9a29b5d2ffb9907d36b8064727fc8dc3ee0b384c Mon Sep 17 00:00:00 2001 From: Greg Hendershott Date: Tue, 21 Jan 2025 11:16:05 -0500 Subject: [PATCH] Skip hash-lang tests unless gui-lib and framework installed; closes #739 --- test/racket/hash-lang-test.rkt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/racket/hash-lang-test.rkt b/test/racket/hash-lang-test.rkt index aca03b61..a3dbd036 100644 --- a/test/racket/hash-lang-test.rkt +++ b/test/racket/hash-lang-test.rkt @@ -1,7 +1,6 @@ #lang racket/base (require rackunit - framework racket/class racket/dict racket/async-channel @@ -11,6 +10,17 @@ "../../racket/lang-info.rkt" "../../racket/util.rkt") +(unless (getenv "DISPLAY") + (displayln "DISPLAY not available; SKIPPING hash-lang tests") + (exit 0)) + +(define racket:text% + (with-handlers ([exn:fail? + (λ _ + (displayln "racket:text% from framework not available; SKIPPING hash-lang tests") + (exit 0))]) + (dynamic-require 'framework 'racket:text%))) + (define hash-lang% (with-handlers ([exn:fail:filesystem:missing-module? (λ _