raco test: fix error summary in direct mode
Also, fix a doc typo
This commit is contained in:
parent
b3ab82c5f9
commit
58d425c00c
|
@ -714,13 +714,15 @@
|
||||||
#:sema (make-semaphore)))
|
#:sema (make-semaphore)))
|
||||||
(when table?
|
(when table?
|
||||||
(display-summary sum))
|
(display-summary sum))
|
||||||
;; Re-log failures and successes, and then report using `test-log`.
|
(unless (or (eq? default-mode 'direct)
|
||||||
;; (This is awkward; is it better to not try to use `test-log`?)
|
(and (not default-mode) single-file?))
|
||||||
(for ([s (in-list sum)])
|
;; Re-log failures and successes, and then report using `test-log`.
|
||||||
(for ([i (in-range (summary-failed s))])
|
;; (This is awkward; is it better to not try to use `test-log`?)
|
||||||
(test-log! #f))
|
(for ([s (in-list sum)])
|
||||||
(for ([i (in-range (- (summary-total s)
|
(for ([i (in-range (summary-failed s))])
|
||||||
(summary-failed s)))])
|
(test-log! #f))
|
||||||
(test-log! #t)))
|
(for ([i (in-range (- (summary-total s)
|
||||||
|
(summary-failed s)))])
|
||||||
|
(test-log! #t))))
|
||||||
(define r (test-log #:display? #t #:exit? #t))
|
(define r (test-log #:display? #t #:exit? #t))
|
||||||
(exit (if (zero? (car r)) 0 1))))
|
(exit (if (zero? (car r)) 0 1))))
|
||||||
|
|
|
@ -22,7 +22,7 @@ discovers and runs all files within the directory that end in
|
||||||
@racket[test-command-line-arguments] in an @filepath{info.rkt} file.
|
@racket[test-command-line-arguments] in an @filepath{info.rkt} file.
|
||||||
|
|
||||||
A test is counted as failing if it logs a failing test code via
|
A test is counted as failing if it logs a failing test code via
|
||||||
@racket[test-log], causes Racket to exit with a non-zero exit code, or
|
@racket[test-log!], causes Racket to exit with a non-zero exit code, or
|
||||||
(when @Flag{e} or @DFlag{check-stderr} is specified) if it produces
|
(when @Flag{e} or @DFlag{check-stderr} is specified) if it produces
|
||||||
output on the error port. The current directory is set to a test
|
output on the error port. The current directory is set to a test
|
||||||
file's directory before running the file.
|
file's directory before running the file.
|
||||||
|
@ -98,7 +98,7 @@ The @exec{raco test} command accepts several flags:
|
||||||
@item{@DFlag{table} or @Flag{t}
|
@item{@DFlag{table} or @Flag{t}
|
||||||
--- Print a summary table after all tests. If a test uses
|
--- Print a summary table after all tests. If a test uses
|
||||||
@racketmodname[rackunit], or if a test at least uses
|
@racketmodname[rackunit], or if a test at least uses
|
||||||
@racket[test-log] from @racketmodname[rackunit/log] to log
|
@racket[test-log!] from @racketmodname[rackunit/log] to log
|
||||||
successes and failures, the table reports test and failure
|
successes and failures, the table reports test and failure
|
||||||
counts based on the log.}
|
counts based on the log.}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user