Diverse aanpassingen
This commit is contained in:
@@ -41,6 +41,15 @@
|
||||
(check-equal? (list-dirs tmp #px"a$")
|
||||
(list (build-path tmp "a")))
|
||||
|
||||
;; Matching is against the entry name, not against parent directories.
|
||||
(define misleading-parent (build-path tmp "compiled-parent"))
|
||||
(make-directory* misleading-parent)
|
||||
(define ordinary-file (build-path misleading-parent "ordinary.txt"))
|
||||
(call-with-output-file ordinary-file (lambda (out) (display "ordinary" out)))
|
||||
(check-false
|
||||
(member ordinary-file
|
||||
(list-dir/files tmp #px"compiled" #:recursive #t)))
|
||||
|
||||
;; Recursive variants select the requested kind directly.
|
||||
(define recursive-baks
|
||||
(list-files tmp #px"(?i:[.]bak$)" #:recursive #t))
|
||||
|
||||
+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