nimpretty: fixes #8626
This commit is contained in:
parent
72cd3b7914
commit
ed38079b9b
5 changed files with 22 additions and 3 deletions
|
|
@ -8,8 +8,15 @@ const
|
|||
var
|
||||
failures = 0
|
||||
|
||||
when defined(develop):
|
||||
const nimp = "bin/nimpretty".addFileExt(ExeExt)
|
||||
if execShellCmd("nim c -o:$# nimpretty/nimpretty.nim" % [nimp]) != 0:
|
||||
quit("FAILURE: compilation of nimpretty failed")
|
||||
else:
|
||||
const nimp = "nimpretty"
|
||||
|
||||
proc test(infile, outfile: string) =
|
||||
if execShellCmd("nimpretty -o:$2 --backup:off $1" % [infile, outfile]) != 0:
|
||||
if execShellCmd("$# -o:$# --backup:off $#" % [nimp, outfile, infile]) != 0:
|
||||
quit("FAILURE")
|
||||
let nimFile = splitFile(infile).name
|
||||
let expected = dir / "expected" / nimFile & ".nim"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue