diff --git a/private/format-utils.rkt b/private/format-utils.rkt index 3d41f45..ce2b7d2 100644 --- a/private/format-utils.rkt +++ b/private/format-utils.rkt @@ -81,8 +81,9 @@ (let loop ([stx stx] [first? #t]) (define (loop* stx) (loop stx #f)) (syntax-parse stx - #:datum-literals (module module* module+) - [((~or module module* module+) e ...) + #:datum-literals (module module* module+ begin-for-syntax define-syntax define-syntaxes) + [((~or module module* module+ begin-for-syntax define-syntax define-syntaxes) + e ...) #:when (not first?) (define ?start (syntax-position stx)) (when ?start diff --git a/raco.rkt b/raco.rkt index 6980be2..9a2e1c3 100644 --- a/raco.rkt +++ b/raco.rkt @@ -83,7 +83,7 @@ (flatten (for/list ([f (in-list files)]) (if (not (directory-exists? f)) - f + (->absolute f) (parameterize ([current-directory (if (absolute-path? f) f @@ -190,7 +190,9 @@ ;; Coverage -> Coverage (define (remove-excluded-paths cover paths) (for/hash ([(k v) (in-hash cover)] - #:unless (is-excluded-path? k paths)) + #:unless (and (is-excluded-path? k paths) + (vprintf "excluding path ~s from output\n" k))) + (vprintf "including path ~s in output\n" k) (values k v))) (module+ test diff --git a/scribblings/api.scrbl b/scribblings/api.scrbl index 3df622f..cf01fba 100644 --- a/scribblings/api.scrbl +++ b/scribblings/api.scrbl @@ -48,8 +48,9 @@ in that file is covered. By default it checks character locations. There are three possible results: @itemize[@item{@racket['irrelevant] --- The location is not considered relevant to coverage information. -It is either not in the coverage information, is in a submodule, or lexes (in the sense of that languages -@racket[_color-lexer]) as a comment or whitespace.} +It is either not in the coverage information; is in a submodule; is a @racket[define-syntax], +@racket[define-syntaxes], or @racket[begin-for-syntax] form; +or lexes (in the sense of that languages, @racket[_color-lexer]) as a comment or whitespace.} @item{@racket['covered] --- The location is not @racket['irrelevant] and is covered} @item{@racket['uncovered] --- The location is not @racket['uncovered] diff --git a/tests/main.rkt b/tests/main.rkt index eacee0d..f59f13a 100644 --- a/tests/main.rkt +++ b/tests/main.rkt @@ -64,7 +64,7 @@ (<= start i (+ start range))])) (module+ test - (define-runtime-path-list test-dirs '("basic" "simple-multi")) + (define-runtime-path-list test-dirs '("basic" "simple-multi" "syntax")) (for-each (compose test-dir path->string) test-dirs)) (module+ test diff --git a/tests/syntax/syntax.rkt b/tests/syntax/syntax.rkt new file mode 100644 index 0000000..53f64bb --- /dev/null +++ b/tests/syntax/syntax.rkt @@ -0,0 +1,2 @@ +#lang racket +(begin-for-syntax 5) diff --git a/tests/syntax/syntax.rktl b/tests/syntax/syntax.rktl new file mode 100644 index 0000000..2dfeb6a --- /dev/null +++ b/tests/syntax/syntax.rktl @@ -0,0 +1,2 @@ +((1 12)) +()