adjust raco test so it test the command-line
arguments to the empty vector before running anything
This commit is contained in:
parent
f749ab1538
commit
2b7c6e32a9
|
@ -23,27 +23,28 @@
|
|||
[(and (file-exists? p)
|
||||
(or (not check-suffix?)
|
||||
(regexp-match #rx#"\\.rkt$" (path->bytes p))))
|
||||
(define something-wasnt-declared? #f)
|
||||
(for ([submodule (in-list (if (null? submodules)
|
||||
'(test)
|
||||
(reverse submodules)))])
|
||||
(define mod `(submod ,p ,submodule))
|
||||
(cond
|
||||
[(module-declared? mod #t)
|
||||
(unless quiet?
|
||||
(printf "running ~s:\n" `(submod ,(if (absolute-path? p)
|
||||
`(file ,(path->string p))
|
||||
(path->string p))
|
||||
,submodule)))
|
||||
(dynamic-require mod #f)]
|
||||
[else
|
||||
(set! something-wasnt-declared? #t)]))
|
||||
(when (and run-anyways? something-wasnt-declared?)
|
||||
(unless quiet?
|
||||
(printf "running ~s:\n" (if (absolute-path? p)
|
||||
`(file ,(path->string p))
|
||||
(path->string p))))
|
||||
(dynamic-require p #f))]
|
||||
(parameterize ([current-command-line-arguments '#()])
|
||||
(define something-wasnt-declared? #f)
|
||||
(for ([submodule (in-list (if (null? submodules)
|
||||
'(test)
|
||||
(reverse submodules)))])
|
||||
(define mod `(submod ,p ,submodule))
|
||||
(cond
|
||||
[(module-declared? mod #t)
|
||||
(unless quiet?
|
||||
(printf "running ~s:\n" `(submod ,(if (absolute-path? p)
|
||||
`(file ,(path->string p))
|
||||
(path->string p))
|
||||
,submodule)))
|
||||
(dynamic-require mod #f)]
|
||||
[else
|
||||
(set! something-wasnt-declared? #t)]))
|
||||
(when (and run-anyways? something-wasnt-declared?)
|
||||
(unless quiet?
|
||||
(printf "running ~s:\n" (if (absolute-path? p)
|
||||
`(file ,(path->string p))
|
||||
(path->string p))))
|
||||
(dynamic-require p #f)))]
|
||||
[(not (file-exists? p))
|
||||
(error 'test "given path ~e does not exist" p)])]))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user