diff options
author | Jacek Sieka <arnetheduck@gmail.com> | 2017-05-15 22:34:30 +0800 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-05-15 16:34:30 +0200 |
commit | 6bbf0fb64d4037b1ae7f00af0c153b1064e05355 (patch) | |
tree | de46505af6380071de3e8f2a601372d471adc4d3 /tests/testament/specs.nim | |
parent | 3afd852f54df2a0bc06be34d06509dfb2b9c80c5 (diff) | |
download | Nim-6bbf0fb64d4037b1ae7f00af0c153b1064e05355.tar.gz |
compiler option for testament (#5713)
* compiler option for testament * different spacing
Diffstat (limited to 'tests/testament/specs.nim')
-rw-r--r-- | tests/testament/specs.nim | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/testament/specs.nim b/tests/testament/specs.nim index 91e8b2ec7..ab24acc70 100644 --- a/tests/testament/specs.nim +++ b/tests/testament/specs.nim @@ -9,8 +9,11 @@ import parseutils, strutils, os, osproc, streams, parsecfg -const - cmdTemplate* = r"compiler" / "nim $target --lib:lib --hints:on -d:testing $options $file" + +var compilerPrefix* = "compiler" / "nim " + +proc cmdTemplate*(): string = + compilerPrefix & "$target --lib:lib --hints:on -d:testing $options $file" type TTestAction* = enum @@ -100,7 +103,7 @@ proc specDefaults*(result: var TSpec) = result.outp = "" result.nimout = "" result.ccodeCheck = "" - result.cmd = cmdTemplate + result.cmd = cmdTemplate() result.line = 0 result.column = 0 result.tfile = "" @@ -173,7 +176,7 @@ proc parseSpec*(filename: string): TSpec = raise newException(ValueError, "cannot interpret as a bool: " & e.value) of "cmd": if e.value.startsWith("nim "): - result.cmd = "compiler" / e.value + result.cmd = compilerPrefix & e.value[4..^1] else: result.cmd = e.value of "ccodecheck": result.ccodeCheck = e.value |