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 label = alignLeft(exp.label, maxLabelLen)
|
||||||
let count = alignLeft($exp.count, maxCountLen)
|
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
|
if (exp.expected and exp.count == 0) or
|
||||||
(not exp.expected and exp.count > 0):
|
(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] =
|
proc parseExpectations(args: Table[string, docopt.Value]): seq[Expectation] =
|
||||||
result = @[]
|
result = @[]
|
||||||
|
|
||||||
for isExpected in [true, false]:
|
for isExpected in [false, true]:
|
||||||
let argName = if isExpected: "--expected" else: "--unexpected"
|
let argName = if isExpected: "--expected" else: "--unexpected"
|
||||||
if args[argName]:
|
if args[argName]:
|
||||||
let exptArgs = split($args[argName], ';')
|
let exptArgs = split($args[argName], ';')
|
||||||
|
|||||||
Reference in New Issue
Block a user