diff options
author | Clyybber <darkmine956@gmail.com> | 2020-10-23 03:26:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-23 03:26:50 +0200 |
commit | 01a62320f03ebd3282a7def231351c4f84c319d2 (patch) | |
tree | 13f2747e3c8101f44d20f82255b51a7a36b38511 /tests/stdlib | |
parent | 2cb484cefb13e4663afd8e0eb2ad81d43f097803 (diff) | |
download | Nim-01a62320f03ebd3282a7def231351c4f84c319d2.tar.gz |
Fix #12410 (#15685)
* Fix #12410, big thanks to @pmetras for this fix * Add testcase
Diffstat (limited to 'tests/stdlib')
-rw-r--r-- | tests/stdlib/tstreams.nim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/stdlib/tstreams.nim b/tests/stdlib/tstreams.nim index 354bdf60f..6979bae38 100644 --- a/tests/stdlib/tstreams.nim +++ b/tests/stdlib/tstreams.nim @@ -6,6 +6,7 @@ Nice name: Arne fs is: nil threw exception +_heh_ ''' nimout: ''' I @@ -49,3 +50,15 @@ block tstreams3: for line in s.lines: echo line s.close + +# bug #12410 + +var a = newStringStream "hehohihahuhyh" +a.readDataStrImpl = nil + +var buffer = "_ooo_" + +doAssert a.readDataStr(buffer, 1..3) == 3 + +echo buffer + |