Commit 5282b96
committed
.tools: Remove redundant r.Pass check when 'fail == 0'
The previous version of this script would always pass this check,
because when 'fail == 0' was true, all of the messages had passed.
That lead to logic like:
a. If all checks passed for the commit and the verbose flag is set,
print all the messages (which all passed).
b. If all checks passed for the commit and the verbose flag is not set,
don't print details about any messages (which all passed).
c. If any checks failed, print all the failed messages.
That wasn't printing successful checks when the verbose flag was true
but some checks failed. This commit shifts the logic around to:
A. If the verbose flag is set, print messages for all checks, using
TAP's "ok" and "not ok" to distinguish between per-check pass/fail
[1].
B. If the verbose flag is not set, only print the failed messages (but
still keep the "not ok" prefix).
In the non-verbose case, then (b/c) and (B) look the same (modulo my
"not ok" prefix adjustment). And in the verbose case, I think (A) is
preferable to (a/c), because there's no reason to *not* print
successful checks when you've enabled the verbose flag.
[1]: http://testanything.org/
Signed-off-by: W. Trevor King <[email protected]>1 parent c00555c commit 5282b96
1 file changed
Lines changed: 10 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | 77 | | |
85 | 78 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
90 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
91 | 90 | | |
92 | 91 | | |
93 | 92 | | |
| |||
0 commit comments