From 0330fb2e1322e0b41d406cfbd42c34031b6bda83 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Sun, 16 Sep 2018 12:28:32 +0200 Subject: fixes #8911 --- tests/stdlib/tstrutil.nim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/stdlib') 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 -- cgit 1.4.1-2-gfad0