-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #138 from astares/137-It-should-be-possible-to-res…
…et-a-ZnCharacterReadStream It should be possible to reset a ZnCharacterReadStream
- Loading branch information
Showing
2 changed files
with
12 additions
and
0 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
repository/Zinc-Character-Encoding-Core.package/ZnEncodedStream.class/instance/reset.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
initialization | ||
reset | ||
|
||
^ stream reset |
8 changes: 8 additions & 0 deletions
8
...y/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testReset.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
tests | ||
testReset | ||
|
||
| stream | | ||
stream := ZnCharacterReadStream on: 'abc' asByteArray readStream. | ||
self assert: stream next equals: $a. | ||
stream reset. | ||
self assert: stream next equals: $a |