diff --git a/src/slfmt.nim b/src/slfmt.nim index 155ed63..50cb81a 100644 --- a/src/slfmt.nim +++ b/src/slfmt.nim @@ -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], ';')