diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-09-16 12:28:32 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-09-16 12:28:43 +0200 |
commit | 0330fb2e1322e0b41d406cfbd42c34031b6bda83 (patch) | |
tree | ea1b161bcbc57aa421b7a8224adc3a85a1331660 /tests/stdlib/tstrutil.nim | |
parent | 866d6d189119b12b70dfd62be9da1eefaf38d5ea (diff) | |
download | Nim-0330fb2e1322e0b41d406cfbd42c34031b6bda83.tar.gz |
fixes #8911
Diffstat (limited to 'tests/stdlib/tstrutil.nim')
-rw-r--r-- | tests/stdlib/tstrutil.nim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/stdlib/tstrutil.nim b/tests/stdlib/tstrutil.nim index f0ee755f7..64b8f8ecc 100644 --- a/tests/stdlib/tstrutil.nim +++ b/tests/stdlib/tstrutil.nim @@ -309,5 +309,20 @@ assert(' '.repeat(0) == "") assert(" ".repeat(0) == "") assert(spaces(0) == "") +# bug #8911 +when true: + static: + let a = "" + let a2 = a.replace("\n", "\\n") + +when true: + static: + let b = "b" + let b2 = b.replace("\n", "\\n") + +when true: + let c = "" + let c2 = c.replace("\n", "\\n") + main() #OUT ha/home/a1xyz/usr/bin |