From b75808c7d992ea47f8d6abc656b881b2aa0f86de Mon Sep 17 00:00:00 2001 From: Dmitry Atamanov Date: Mon, 20 Aug 2018 17:55:22 +0300 Subject: Fixes ropes regressions due to the not-nil strings (#8687) --- tests/stdlib/tropes.nim | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/stdlib/tropes.nim (limited to 'tests/stdlib') diff --git a/tests/stdlib/tropes.nim b/tests/stdlib/tropes.nim new file mode 100644 index 000000000..59239a600 --- /dev/null +++ b/tests/stdlib/tropes.nim @@ -0,0 +1,36 @@ +discard """ + file: "tropes.nim" + output: '''0 +3 + +123 +3 +6 +123 +123456 +2 +3''' +""" +import ropes + +var + r1 = rope("") + r2 = rope("123") + +echo r1.len +echo r2.len + +echo r1 +echo r2 + +r1.add("123") +r2.add("456") + +echo r1.len +echo r2.len + +echo r1 +echo r2 + +echo r1[1] +echo r2[2] \ No newline at end of file -- cgit 1.4.1-2-gfad0