diff options
author | 3n-k1 <51172302+3n-k1@users.noreply.github.com> | 2019-11-28 02:32:11 -0500 |
---|---|---|
committer | Miran <narimiran@disroot.org> | 2019-11-28 08:32:11 +0100 |
commit | 0944b0f4415a262968cf68f1dbb035cfc3326680 (patch) | |
tree | f352639cd219382cb1520ff15366237c45ebc320 /testament/testament.nim | |
parent | a7aeabb9d2c70a5d9bd89abf3eb08372d2c6d9d0 (diff) | |
download | Nim-0944b0f4415a262968cf68f1dbb035cfc3326680.tar.gz |
[backport] Fix style issues in lib/, tools/, and testament/. Fixes #12687. (#12754)
Diffstat (limited to 'testament/testament.nim')
-rw-r--r-- | testament/testament.nim | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/testament/testament.nim b/testament/testament.nim index a36cad20b..c7aa854b8 100644 --- a/testament/testament.nim +++ b/testament/testament.nim @@ -90,7 +90,7 @@ proc getFileDir(filename: string): string = if not result.isAbsolute(): result = getCurrentDir() / result -proc execCmdEx2(command: string, args: openarray[string]; workingDir, input: string = ""): tuple[ +proc execCmdEx2(command: string, args: openArray[string]; workingDir, input: string = ""): tuple[ cmdLine: string, output: TaintedString, exitCode: int] {.tags: @@ -465,7 +465,7 @@ proc testSpecHelper(r: var TResults, test: TTest, expected: TSpec, target: TTarg if exitCode != expected.exitCode: r.addResult(test, target, "exitcode: " & $expected.exitCode, "exitcode: " & $exitCode & "\n\nOutput:\n" & - bufB, reExitCodesDiffer) + bufB, reExitcodesDiffer) elif (expected.outputCheck == ocEqual and expected.output != bufB) or (expected.outputCheck == ocSubstr and expected.output notin bufB): given.err = reOutputsDiffer @@ -522,7 +522,7 @@ proc testC(r: var TResults, test: TTest, action: TTestAction) = elif action == actionRun: let exeFile = changeFileExt(test.name, ExeExt) var (_, exitCode) = execCmdEx(exeFile, options = {poStdErrToStdOut, poUsePath}) - if exitCode != 0: given.err = reExitCodesDiffer + if exitCode != 0: given.err = reExitcodesDiffer if given.err == reSuccess: inc(r.passed) proc testExec(r: var TResults, test: TTest) = @@ -535,7 +535,7 @@ proc testExec(r: var TResults, test: TTest) = if errC == 0: given.err = reSuccess else: - given.err = reExitCodesDiffer + given.err = reExitcodesDiffer given.msg = outp.string if given.err == reSuccess: inc(r.passed) @@ -599,8 +599,8 @@ proc loadSkipFrom(name: string): seq[string] = result.add sline proc main() = - os.putenv "NIMTEST_COLOR", "never" - os.putenv "NIMTEST_OUTPUT_LVL", "PRINT_FAILURES" + os.putEnv "NIMTEST_COLOR", "never" + os.putEnv "NIMTEST_OUTPUT_LVL", "PRINT_FAILURES" backend.open() var optPrintResults = false @@ -612,7 +612,7 @@ proc main() = var p = initOptParser() p.next() - while p.kind in {cmdLongoption, cmdShortOption}: + while p.kind in {cmdLongOption, cmdShortOption}: case p.key.string.normalize of "print", "verbose": optPrintResults = true of "failing": optFailing = true |