[squeak-dev] The Trunk: MultilingualTests-nice.17.mcz
Levente Uzonyi
leves at elte.hu
Fri Nov 1 00:56:46 UTC 2013
I think it's intentional. The content of the chunks shouldn't be changed
while being read. Let's say I implement #isCr: as
isCr: aCharacter
^$
== aCharacter
By default it will return true if the argument foo is a carriage return
character, otherwise false. But if we allow changing the line endings in
chunks, then its behavior might be different after loading.
Levente
On Thu, 31 Oct 2013, commits at source.squeak.org wrote:
> Nicolas Cellier uploaded a new version of MultilingualTests to project The Trunk:
> http://source.squeak.org/trunk/MultilingualTests-nice.17.mcz
>
> ==================== Summary ====================
>
> Name: MultilingualTests-nice.17
> Author: nice
> Time: 31 October 2013, 11:54:33.464 pm
> UUID: 6de55950-5fff-43d1-9ce0-8b661515f618
> Ancestors: MultilingualTests-tpr.16
>
> Add a test showing that MultiByteFileStream>>nextChunk fails to honour its own lineEndConvention.
>
> =============== Diff against MultilingualTests-tpr.16 ===============
>
> Item was added:
> + ----- Method: MultiByteFileStreamTest>>testLineEndingChunk (in category 'testing') -----
> + testLineEndingChunk
> +
> + fileName := 'foolinend.txt'.
> + MultiByteFileStream forceNewFileNamed: fileName do: [ :file |
> + file
> + wantsLineEndConversion: false;
> + nextPutAll: 'line 1'; cr;
> + nextPutAll: 'line 2'; crlf;
> + nextPutAll: 'line 3'; lf;
> + nextPutAll: 'line 4'; nextPut: $!! ].
> + {
> + {#cr. 'line 1' , String cr , 'line 2' , String cr , 'line 3' , String cr , 'line 4'}.
> + {#lf. 'line 1' , String cr , 'line 2' , String cr , 'line 3' , String cr , 'line 4'}.
> + {#crlf. 'line 1' , String cr , 'line 2' , String cr , 'line 3' , String cr , 'line 4'}.
> + {nil. 'line 1' , String cr , 'line 2' , String crlf , 'line 3' , String lf , 'line 4'}
> + } do: [:lineEndingResult |
> + MultiByteFileStream oldFileNamed: fileName do: [ :file |
> + file lineEndConvention: lineEndingResult first.
> + self assert: lineEndingResult last equals: file nextChunk ] ]!
>
>
>
More information about the Squeak-dev
mailing list
|