Skip to content

Commit

Permalink
Skip hash-lang tests unless gui-lib and framework installed; closes #739
Browse files Browse the repository at this point in the history
  • Loading branch information
greghendershott committed Jan 21, 2025
1 parent 8341533 commit 9a29b5d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/racket/hash-lang-test.rkt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#lang racket/base

(require rackunit
framework
racket/class
racket/dict
racket/async-channel
Expand All @@ -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?
(λ _
Expand Down

0 comments on commit 9a29b5d

Please sign in to comment.