[Pharo-project] Issue 3663 in pharo: XMLWriter and MultiByteFileStream

pharo at googlecode.com pharo at googlecode.com
Sun Feb 6 12:06:56 CET 2011


Comment #3 on issue 3663 by stephane... at gmail.com: 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





More information about the Pharo-project mailing list