summary refs log tree commit diff stats
path: root/tests/arc/tstrformat.nim
blob: 00d7a6679a37c2fff5f2934fdd69c0cbaebef9f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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")