Andreas Raab uploaded a new version of MultilingualTests to project The Trunk:
http://source.squeak.org/trunk/MultilingualTests-ar.12.mcz==================== Summary ====================
Name: MultilingualTests-ar.12
Author: ar
Time: 1 September 2010, 6:52:49.056 pm
UUID: b1069f2e-2319-2148-bb4f-1f24ee1e8f46
Ancestors: MultilingualTests-HenrikSperreJohansen.10
Add tests for UTF-8 conversions.
=============== Diff against MultilingualTests-HenrikSperreJohansen.10 ===============
Item was added:
+ ----- Method: UTF8TextConverterTest>>testSqueakToUtf8 (in category 'tests') -----
+ testSqueakToUtf8
+ "Ensure proper encoding"
+
+ self assert: '' squeakToUtf8 equals: ''.
+ self assert: 'Hello World' squeakToUtf8 equals: 'Hello World'.
+ self assert: 'Grüß Gott' squeakToUtf8 asByteArray
+ equals: #[71 114 195 188 195 159 32 71 111 116 116]!
Item was added:
+ ----- Method: UTF8TextConverterTest>>testUtf8ToSqueak (in category 'tests') -----
+ testUtf8ToSqueak
+ "Ensure proper encoding"
+
+ self assert: '' utf8ToSqueak equals: ''.
+ self assert: 'Hello World' utf8ToSqueak equals: 'Hello World'.
+ self assert: #[71 114 195 188 195 159 32 71 111 116 116] asString utf8ToSqueak
+ equals: 'Grüß Gott'
+
+ !
Item was added:
+ ----- Method: UTF8TextConverterTest>>testLazyConversion (in category 'tests') -----
+ testLazyConversion
+ "Ensure the lazy conversions do what they should"
+
+ | strict result |
+ strict := UTF8TextConverter strictUtf8Conversions.
+ [UTF8TextConverter strictUtf8Conversions: false.
+ self shouldnt:[result := 'Grüß Gott' utf8ToSqueak ] raise: Error.
+ ] ensure:[UTF8TextConverter strictUtf8Conversions: strict].
+
+ self assert: result = 'Grüß Gott'.
+ !
Item was added:
+ ----- Method: UTF8TextConverterTest>>testStrictConversion (in category 'tests') -----
+ testStrictConversion
+ "Ensure the strict conversions do what they should"
+
+ | strict |
+ strict := UTF8TextConverter strictUtf8Conversions.
+ [UTF8TextConverter strictUtf8Conversions: true.
+ self should:[ 'Grüß Gott' utf8ToSqueak ] raise: Error.
+ ] ensure:[UTF8TextConverter strictUtf8Conversions: strict].!
Item was added:
+ ClassTestCase subclass: #UTF8TextConverterTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'MultilingualTests-TextConversion'!