Comment #3 on issue 3663 by [email protected]: XMLWriter and
MultiByteFileStream
http://code.google.com/p/pharo/issues/detail?id=3663
----- Method: MultiByteFileStreamTest>>testNextPutAllStartingAt (in
category 'testing') -----
testNextPutAllStartingAt
| result |
fileName := 'foonextputallstartingat.txt'.
MultiByteFileStream forceNewFileNamed: fileName do: [ :file |
+ { 'abcde' asWideString. 'abcde' } do: [ :string |
+ file
+ next: 1 putAll: string startingAt: 5;
+ next: 3 putAll: string startingAt: 2;
+ next: 1 putAll: string startingAt: 1 ] ].
- file
- next: 1 putAll: 'abcde' startingAt: 5;
- next: 3 putAll: 'abcde' startingAt: 2;
- next: 1 putAll: 'abcde' startingAt: 1 ].
result := StandardFileStream readOnlyFileNamed: fileName do: [ :file
|
file binary; contents ].
+ self assert: #[101 98 99 100 97 101 98 99 100 97] equals: result
- self assert: #[101 98 99 100 97] equals: result