mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 06:20:38 +00:00
Fixes ropes regressions due to the not-nil strings (#8687)
This commit is contained in:
committed by
Andreas Rumpf
parent
b28c7d434b
commit
b75808c7d9
36
tests/stdlib/tropes.nim
Normal file
36
tests/stdlib/tropes.nim
Normal file
@@ -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]
|
||||
Reference in New Issue
Block a user