summary refs log tree commit diff stats
path: root/tests/stdlib/tstrutil.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-09-16 12:28:32 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-09-16 12:28:43 +0200
commit0330fb2e1322e0b41d406cfbd42c34031b6bda83 (patch)
treeea1b161bcbc57aa421b7a8224adc3a85a1331660 /tests/stdlib/tstrutil.nim
parent866d6d189119b12b70dfd62be9da1eefaf38d5ea (diff)
downloadNim-0330fb2e1322e0b41d406cfbd42c34031b6bda83.tar.gz
fixes #8911
Diffstat (limited to 'tests/stdlib/tstrutil.nim')
-rw-r--r--tests/stdlib/tstrutil.nim15
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