Diverse aanpassingen
This commit is contained in:
+14
-6
@@ -3,15 +3,23 @@
|
||||
(require rackunit
|
||||
(only-in racket-makefile raco))
|
||||
|
||||
(check-not-exn
|
||||
(lambda ()
|
||||
(raco '(help))))
|
||||
;; DrDr (used by the package build service) counts any output on stderr as a
|
||||
;; test failure. `raco help` legitimately writes its usage text to stderr, so
|
||||
;; keep the child process output local to this test.
|
||||
(define (check-raco-help)
|
||||
(define out (open-output-string))
|
||||
(define err (open-output-string))
|
||||
(parameterize ([current-output-port out]
|
||||
[current-error-port err])
|
||||
(check-not-exn
|
||||
(lambda ()
|
||||
(raco '(help))))))
|
||||
|
||||
(check-raco-help)
|
||||
|
||||
;; It must not require raco to be on PATH. The current Racket installation
|
||||
;; should locate its own raco first.
|
||||
(define env (environment-variables-copy (current-environment-variables)))
|
||||
(environment-variables-set! env #"PATH" #f)
|
||||
(parameterize ([current-environment-variables env])
|
||||
(check-not-exn
|
||||
(lambda ()
|
||||
(raco '(help)))))
|
||||
(check-raco-help))
|
||||
|
||||
Reference in New Issue
Block a user