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"
|
||||
|
|
|
|||
|
|
@ -316,3 +316,8 @@ proc f() =
|
|||
str &= c
|
||||
|
||||
const test = r"C:\Users\-\Desktop\test.txt"
|
||||
|
||||
proc getKeyAndData(cursor: int, op: int):
|
||||
tuple[key, data: string, success: bool] {.noInit.} =
|
||||
var keyVal: string
|
||||
var dataVal: string
|
||||
|
|
|
|||
|
|
@ -325,3 +325,8 @@ proc f() =
|
|||
str &= c
|
||||
|
||||
const test = r"C:\Users\-\Desktop\test.txt"
|
||||
|
||||
proc getKeyAndData(cursor: int; op: int):
|
||||
tuple[key, data: string; success: bool] {.noInit.} =
|
||||
var keyVal: string
|
||||
var dataVal: string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue