Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move utf8 test file read/write test to Pharo specific test package an…
…d mark it as expected failure for Pharo 7 (and earlier)
  • Loading branch information
Johan Brichau committed Aug 16, 2021
commit d305fd5012acec83d6d773234c71ff95d594c8ba
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
tests-filestreams
testReadWriteToFileInFolderText
#('Ph''nglui mglw''nafh Cthulhu R''lyeh wgah''nagl fhtagn' 'Übèrstrîñgé') do:[ :text |
self
writeToFile: text
withFileNameDo:[ :fileName |
self assert: text equals: (GRPlatform current contentsOfFile: fileName binary: false) ] ].
| text |
text := 'Ph''nglui mglw''nafh Cthulhu R''lyeh wgah''nagl fhtagn'.
self
writeToFile: text
withFileNameDo:[ :fileName |
self assert: (text = (GRPlatform current contentsOfFile: fileName binary: false)) ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
running
expectedFailures
"UTF8 encoding/decoding for text files only available from Pharo7"
Smalltalk at: #SystemVersion ifPresent: [ :systemVersion |
| versionString |
versionString := systemVersion current version.
(versionString beginsWith: 'Pharo') ifTrue: [
systemVersion current major <= 7
ifTrue: [ ^ #(testReadWriteToFileInFolderTextUTF8) ] ] ].
^ #()
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tests-filestreams
testReadWriteToFileInFolderTextUTF8
#('Übèrstrîñgé' '£ęλ~') do:[ :text |
self
writeToFile: text
withFileNameDo:[ :fileName |
self assert: text equals: (GRPlatform current contentsOfFile: fileName binary: false) ] ].