From f0c454a3995b92ae50ecb3f511168e2bef21019b Mon Sep 17 00:00:00 2001 From: Ivan Bobev Date: Thu, 8 Aug 2019 16:34:48 +0300 Subject: [PATCH] Fix compilation without warnings test case Compilation without warnings test case on Unix systems with older Nim version 0.19.6 had been failing before the fix, because the compiler expects full file name to be passed after the '-o' switch, but not only an output directory name. Related to #680 --- tests/tester.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/tester.nim b/tests/tester.nim index 079d9f5..2c39a83 100644 --- a/tests/tester.nim +++ b/tests/tester.nim @@ -882,7 +882,8 @@ test "compilation without warnings": ] proc execBuild(fileName: string): tuple[output: string, exitCode: int] = - result = execCmdEx(fmt"nim c -o:{buildDir} {fileName}") + result = execCmdEx( + fmt"nim c -o:{buildDir/fileName.splitFile.name} {fileName}") proc checkOutput(output: string): uint = const warningsToCheck = [ @@ -898,6 +899,8 @@ test "compilation without warnings": checkpoint(line) inc(result) + removeDir(buildDir) + var linesWithWarningsCount: uint = 0 for file in filesToBuild: let (output, exitCode) = execBuild(file)