Don't show sample highlighting for expected fields (which will never be highlighted).
This commit is contained in:
@@ -278,7 +278,10 @@ func formatExpectationLabels(expectations: seq[Expectation]): string =
|
||||
let label = alignLeft(exp.label, maxLabelLen)
|
||||
let count = alignLeft($exp.count, maxCountLen)
|
||||
|
||||
result = exp.termStyleCode & label & RESET_FORMATTING & " - "
|
||||
if exp.expected:
|
||||
result = label & " - "
|
||||
else:
|
||||
result = exp.termStyleCode & label & RESET_FORMATTING & " - "
|
||||
|
||||
if (exp.expected and exp.count == 0) or
|
||||
(not exp.expected and exp.count > 0):
|
||||
@@ -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], ';')
|
||||
|
||||
Reference in New Issue
Block a user