Removed long-since defunct LLVM bootstrap code. Any LLVM strategy will have to be...
[cslatevm.git] / tests / i18n.slate
blob1cf2203484136e98a7b7a5cebe1ecb61909aa626
2 _@lobby testRead: filename encoding: encoding
3 [| test times |
4   test: ExtensibleArray new.
5   (File newNamed: filename &mode: File Read)
6     sessionDo:
7       [| :file decoder |
8        decoder: (encoding Decoder newOn: file reader).
9        [decoder isAtEnd] whileFalse:
10          [test addLast: decoder next]].
11   test as: UnicodeString
14 _@lobby testRW: sourceFileName to: targetFileName inEncoding: inenc outEncoding: outenc &littleEndian: le
16   (File newNamed: sourceFileName &mode: File Read) sessionDo:
17     [| :source |
18      (File newNamed: targetFileName &mode: File CreateWrite)
19        sessionDo:
20          [| :target |
21           (inenc Decoder newOn: source reader)
22             >> (outenc Encoder newOn: target writer &littleEndian: le)]].
25 lobby addSlot: #test valued: (testRead: 'tests/testuni.txt' encoding: UTF8).
26 Unicode subsetAt: ((test at: 0) as: Integer).
27 (test at: 0) isLetter.
29 lobby addSlot: #encoder valued: (UTF8 Encoder newOn: Console writer).
30 test reader >> encoder.
32 "The test files aren't here because I'm not sure about copyrights. You can find them at 
33 http://jshin.net/i18n/utftest/"
35 lobby addSlot: #test16BE valued: (testRead: 'tests/i18n/nobom.utf16be.html' encoding: UTF16BE).
36 lobby addSlot: #test16LE valued: (testRead: 'tests/i18n/nobom.utf16le.html' encoding: UTF16LE).
37 lobby addSlot: #test16BEBOM valued: (testRead: 'tests/i18n/bom.utf16be.html' encoding: UTF16).
38 lobby addSlot: #test16LEBOM valued: (testRead: 'tests/i18n/bom.utf16le.html' encoding: UTF16).
40 testRW: 'tests/i18n/nobom.utf16be.html' to: 'tests/i18n/test-nobom16be' inEncoding: UTF16BE outEncoding: UTF16BE.
41 testRW: 'tests/i18n/nobom.utf16le.html' to: 'tests/i18n/test-nobom16le' inEncoding: UTF16LE outEncoding: UTF16LE.
42 testRW: 'tests/i18n/bom.utf16be.html' to: 'tests/i18n/test-bom16be' inEncoding: UTF16 outEncoding: UTF16.
43 testRW: 'tests/i18n/bom.utf16le.html' to: 'tests/i18n/test-bom16le' inEncoding: UTF16 outEncoding: UTF16 &littleEndian: True.
45 "This just check that the normalization does something. Add tests whether the results are correct."
47 ('käöå' as: UnicodeString) normalizeTo: Unicode NFD.
48 ('käöå' as: UnicodeString) normalizeTo: Unicode NFKD.
49 ('käöå' as: UnicodeString) normalizeTo: Unicode NFC.
50 ('käöå' as: UnicodeString) normalizeTo: Unicode NFKC.