Commit 6463da2
committed
test: cover ErrorFormatter direct path and single-char inverse flag
Brings codecov patch coverage to 100% for the changed lines:
- TestHandleExitCoder_ErrorFormatterDirect exercises the Fprintf
branch in HandleExitCoder when an ExitCoder also implements
ErrorFormatter and is passed in directly (the existing
TestHandleExitCoder_ErrorFormatter routes through a multiError
which goes down a different branch).
- TestBoolWithInverseFlagStringNoPanicWithNoTabStringer is split into
multi-character and single-character sub-tests so the `-` vs `--`
prefix branch is covered.
Signed-off-by: alliasgher <alliasgher123@gmail.com>1 parent bb2e3ea commit 6463da2
2 files changed
+34
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
533 | 533 | | |
534 | 534 | | |
535 | 535 | | |
536 | | - | |
537 | | - | |
538 | | - | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
539 | 543 | | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
545 | 551 | | |
0 commit comments