diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-11-19 12:09:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-19 12:09:36 +0100 |
commit | 56a00da34a2ec4dd9bebabb03d3adda720b93a55 (patch) | |
tree | 2fc562034cf9b15e940e04ad8b7b3e056907d904 /tests | |
parent | 03fa9a9041bfa425ce54056e734eb264b841d463 (diff) | |
download | Nim-56a00da34a2ec4dd9bebabb03d3adda720b93a55.tar.gz |
fixes #12612 [backport] (#12681)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/stdlib/tstrformat.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/stdlib/tstrformat.nim b/tests/stdlib/tstrformat.nim index a8dad6084..403372aed 100644 --- a/tests/stdlib/tstrformat.nim +++ b/tests/stdlib/tstrformat.nim @@ -134,6 +134,14 @@ doAssert fmt"{nat:3o}" == "100" doAssert fmt"{nat:3x}" == " 40" doAssert fmt"{nat:3X}" == " 40" +# bug #12612 +proc my_proc = + const value = "value" + const a = &"{value}" + assert a == value + +my_proc() + block: template fmt(pattern: string; openCloseChar: char): untyped = fmt(pattern, openCloseChar, openCloseChar) |