Don't show sample highlighting for expected fields (which will never be highlighted).

This commit is contained in:
2025-12-19 09:20:50 -06:00
parent 29bca76cf1
commit 4e96e8c175

View File

@@ -278,6 +278,9 @@ func formatExpectationLabels(expectations: seq[Expectation]): string =
let label = alignLeft(exp.label, maxLabelLen)
let count = alignLeft($exp.count, maxCountLen)
if exp.expected:
result = label & " - "
else:
result = exp.termStyleCode & label & RESET_FORMATTING & " - "
if (exp.expected and exp.count == 0) or
@@ -296,7 +299,7 @@ proc parseLogLine(logLine: string): JsonNode =
proc parseExpectations(args: Table[string, docopt.Value]): seq[Expectation] =
result = @[]
for isExpected in [true, false]:
for isExpected in [false, true]:
let argName = if isExpected: "--expected" else: "--unexpected"
if args[argName]:
let exptArgs = split($args[argName], ';')