diff --git a/main.rkt b/main.rkt index c5b6be0..fe9c808 100644 --- a/main.rkt +++ b/main.rkt @@ -1,6 +1,7 @@ #lang racket/base (require "cover.rkt" "format.rkt" "private/contracts.rkt" "private/format-utils.rkt" "private/raw.rkt" racket/contract) + (provide (contract-out [coverage/c contract?] @@ -8,8 +9,9 @@ [test-files! (->* () (#:submod symbol?) #:rest (listof (or/c path-string? - (list/c path-string? (vectorof string? - #:immutable #t)))) + (list/c path-string? + (and/c (lambda (v) (not (impersonator? v))) + (vectorof string? #:immutable #t))))) any)] [clear-coverage! (-> any)] [get-test-coverage (-> coverage/c)] diff --git a/scribblings/api.scrbl b/scribblings/api.scrbl index 0711b0c..d5fb64d 100644 --- a/scribblings/api.scrbl +++ b/scribblings/api.scrbl @@ -26,12 +26,19 @@ removed during macro expansion and are thus neither run or not run. Note that the @racket[srcloc]s are one indexed, meaning a @racket[1] represents the first character in the file.} -@defproc[(test-files! (#:submod submod symbol? 'test) (files path-string?) ...) any]{ +@defproc[(test-files! (#:submod submod symbol? 'test) + (files (or/c path-string? + (list/c path-string + (and/c (negate impersonator?) + (vectorof string? #:immutable #t))))) ...) + any]{ -Runs all given @racket[files] and their submodule @racket[submod] (if it exists), storing the coverage information. -The function returns false if any tests fail. -Test coverage information is still collected when test fail. -Test coverage info is added to existing coverage info.} +Runs all given @racket[files] and their submodule @racket[submod] (if it exists), storing the +coverage information. If the path is paired with a vector then that vector is used as the +@racket[current-command-line-arguments] when executing that file. This vector must be immuatable and +not wrapped by a @racket[chaperone] or @racket[impersonator]. The function returns false if any +tests fail. Test coverage information is still collected when test fail. Test coverage info is +added to existing coverage info.} @defproc[(clear-coverage!) any]{Clears all coverage information.}