Skip to content

Commit

Permalink
Merge pull request #145 from matburnx/-ZnBufferedWriteStream-does-not…
Browse files Browse the repository at this point in the history
…-support-#reset

Fix ZnBufferedWriteStream does not support #reset
  • Loading branch information
svenvc authored Jun 5, 2024
2 parents 7035a17 + f598de7 commit a340624
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
reset
self flushBuffer.
stream reset
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SystemOrganization addCategory: #'Zinc-Character-Encoding-Core'!
SystemOrganization addCategory: #'Zinc-Character-Encoding-Core'!
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
tests
testWritingReset

| file writeStream readStream |
file := 'test.txt' asFileReference ensureCreateFile.

writeStream := file binaryWriteStream.
writeStream nextPutAll: 'pedro'.
writeStream reset.
writeStream nextPutAll: 'pha'.
writeStream close.

readStream := file readStream.
self assert: readStream contents equals: 'pharo'

0 comments on commit a340624

Please sign in to comment.