Files
Nim/tests/arc/tstrformat.nim
Timothee Cour b809562c7c make megatest consistent with unjoined tests wrt newlines, honor newlines in output spec (#16151)
* fix megatest newlines
* still allow missing trailing newline for now but in a more strict way than before
2020-11-28 09:09:31 +01:00

23 lines
326 B
Nim

discard """
output: '''
verstuff
'''
cmd: "nim c --gc:arc $file"
"""
# bug #13622
import strformat
template necho*(args: string) {.dirty.} =
if getCurrentException() != nil:
echo args
else:
stdout.writeLine(args)
proc main(cond: bool; arg: string) =
if cond:
necho &"ver{arg}\n"
main(true, "stuff")