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
This commit is contained in:
parent
427b412ff9
commit
f0c454a399
1 changed files with 4 additions and 1 deletions
|
|
@ -882,7 +882,8 @@ test "compilation without warnings":
|
||||||
]
|
]
|
||||||
|
|
||||||
proc execBuild(fileName: string): tuple[output: string, exitCode: int] =
|
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 =
|
proc checkOutput(output: string): uint =
|
||||||
const warningsToCheck = [
|
const warningsToCheck = [
|
||||||
|
|
@ -898,6 +899,8 @@ test "compilation without warnings":
|
||||||
checkpoint(line)
|
checkpoint(line)
|
||||||
inc(result)
|
inc(result)
|
||||||
|
|
||||||
|
removeDir(buildDir)
|
||||||
|
|
||||||
var linesWithWarningsCount: uint = 0
|
var linesWithWarningsCount: uint = 0
|
||||||
for file in filesToBuild:
|
for file in filesToBuild:
|
||||||
let (output, exitCode) = execBuild(file)
|
let (output, exitCode) = execBuild(file)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue