This commit is contained in:
Andreas Rumpf 2020-03-18 13:42:33 +01:00 • committed by GitHub
commit a87062393a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 2 deletions

20
tests/arc/tstrformat.nim Normal file
View file

@ -0,0 +1,20 @@
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")