summary refs log tree commit diff stats
path: root/tests/stdlib
diff options
context:
space:
mode:
authorDmitry Atamanov <data-man@users.noreply.github.com>2018-08-20 17:55:22 +0300
committerAndreas Rumpf <rumpf_a@web.de>2018-08-20 16:55:22 +0200
commitb75808c7d992ea47f8d6abc656b881b2aa0f86de (patch)
tree15db5f0070445def74e12bd957fe54cf5b347712 /tests/stdlib
parentb28c7d434b16ebd9cc33ef1d6b267b49660153ba (diff)
downloadNim-b75808c7d992ea47f8d6abc656b881b2aa0f86de.tar.gz
Fixes ropes regressions due to the not-nil strings (#8687)
Diffstat (limited to 'tests/stdlib')
-rw-r--r--tests/stdlib/tropes.nim36
1 files changed, 36 insertions, 0 deletions
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