Diverse aanpassingen

This commit is contained in:
2026-08-09 14:56:42 +02:00
parent ac8e492aff
commit 2e1899292c
8 changed files with 63 additions and 22 deletions
+9
View File
@@ -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
View File
@@ -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))