handle syntax only code as missing
This commit is contained in:
parent
ae0ce4491c
commit
d5d433d802
|
@ -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
|
||||
|
|
6
raco.rkt
6
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
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
2
tests/syntax/syntax.rkt
Normal file
2
tests/syntax/syntax.rkt
Normal file
|
@ -0,0 +1,2 @@
|
|||
#lang racket
|
||||
(begin-for-syntax 5)
|
2
tests/syntax/syntax.rktl
Normal file
2
tests/syntax/syntax.rktl
Normal file
|
@ -0,0 +1,2 @@
|
|||
((1 12))
|
||||
()
|
Loading…
Reference in New Issue
Block a user