We are interested in improving test coverage of Pharo so thanks for your
initiative.
Le 8/12/14 22:27, sheri...@sheridan-mahoney.com a écrit :
Hi,
I've been looking into MultiByteFileStream for adding tests in this
area, and have come up against what appears to me to be an anomaly. I
ran the following 4 tests:
FileStream fileNamed: 'test.txt'
do: [ :str | str
nextPutAll: '123';
crlf ].
MultiByteFileStream fileNamed: 'test2.txt'
do: [ :str | str
nextPutAll: '123';
crlf ].
FileStream fileNamed: 'test3.txt'
do: [ :str | str
nextPutAll: 'élève en Français';
crlf ].
MultiByteFileStream fileNamed: 'test4.txt'
do: [ :str | str
nextPutAll: 'élève en Français';
crlf ].
The results are:
Input string Result Unix File
Class Class Type
---------------------------------------------------------------
FileStream '123' MultiByte- ASCII text
FileStream
MultiByte- '123' MultiByte- ASCII text
FileStream FileStream
FileStream 'élève en MultiByte- UTF-8 Unicode
Français' FileStream
MultiByte- 'élève en MultiByte- UTF-8 Unicode
FileStream Français' FileStream
Do operations involving FileStream as input always return a
MultiByteFileStream?
Thanks,
Sheridan