Patrick Rein uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-pre.288.mcz ==================== Summary ==================== Name: CollectionsTests-pre.288 Author: pre Time: 30 April 2018, 1:24:08.916117 pm UUID: fef6fd38-d4b4-2946-82c5-91228cf600d4 Ancestors: CollectionsTests-eem.287 Adds a test for the updated quoted printable converter =============== Diff against CollectionsTests-eem.287 =============== Item was added: + TestCase subclass: #QuotedPrintableMimeConverterTest + instanceVariableNames: 'message' + classVariableNames: '' + poolDictionaries: '' + category: 'CollectionsTests-Streams'! Item was added: + ----- Method: QuotedPrintableMimeConverterTest>>setUp (in category 'as yet unclassified') ----- + setUp + message := 'Hü Thörä!!' readStream. + ! Item was added: + ----- Method: QuotedPrintableMimeConverterTest>>testDecode (in category 'as yet unclassified') ----- + testDecode + + | encodedString decodedString | + encodedString := '=E0'. + decodedString := QuotedPrintableMimeConverter mimeDecode: encodedString as: WideString. + self assert: 'à' equals: decodedString. + + encodedString := 'H=FC Th=F6r=E4!!'. + decodedString := QuotedPrintableMimeConverter mimeDecode: encodedString as: WideString. + self assert: 'Hü Thörä!!' equals: decodedString. + + ! Item was added: + ----- Method: QuotedPrintableMimeConverterTest>>testDecodeCrLfToCr (in category 'as yet unclassified') ----- + testDecodeCrLfToCr + + | encodedString decodedString targetString | + encodedString := ((WriteStream on: '') + << 'a'; crlf; << 'b') contents. + decodedString := QuotedPrintableMimeConverter mimeDecode: encodedString as: WideString. + targetString := encodedString := ((WriteStream on: '') + << 'a'; cr; << 'b') contents. + self assert: targetString equals: decodedString.! Item was added: + ----- Method: QuotedPrintableMimeConverterTest>>testDecodeMultiline (in category 'as yet unclassified') ----- + testDecodeMultiline + + | encodedString decodedString | + encodedString := 'A multiline = + encoded text which isn''t'. + decodedString := QuotedPrintableMimeConverter mimeDecode: encodedString as: WideString. + self assert: 'A multiline encoded text which isn''t' equals: decodedString. + ! Item was added: + ----- Method: QuotedPrintableMimeConverterTest>>testEncodeEqualSign (in category 'as yet unclassified') ----- + testEncodeEqualSign + + | encodedString | + encodedString := QuotedPrintableMimeConverter mimeEncode: 'e=mc2'. + self assert: 'e=3Dmc2' equals: encodedString. + ! Item was added: + ----- Method: QuotedPrintableMimeConverterTest>>testEncodeMultilineString (in category 'as yet unclassified') ----- + testEncodeMultilineString + + | encodedString sourceString targetString | + sourceString := 'a multi- + line string'. + encodedString := QuotedPrintableMimeConverter mimeEncode: sourceString. + + targetString := 'a multi-' , String crlf , 'line string'. + self assert: targetString equals: encodedString.! Item was added: + ----- Method: QuotedPrintableMimeConverterTest>>testEncodeSimpleString (in category 'as yet unclassified') ----- + testEncodeSimpleString + + | encodedString | + encodedString := QuotedPrintableMimeConverter mimeEncode: message. + self assert: 'H=FC Th=F6r=E4!!' equals: encodedString. + ! Item was added: + ----- Method: QuotedPrintableMimeConverterTest>>testEncodeWhitespace (in category 'as yet unclassified') ----- + testEncodeWhitespace + + | encodedString sourceString targetString | + sourceString := 'a string with all the whitespace'. + encodedString := QuotedPrintableMimeConverter mimeEncode: sourceString. + + targetString := 'a string with all the whitespace'. + self assert: targetString equals: encodedString.! Item was added: + ----- Method: QuotedPrintableMimeConverterTest>>testEncodingBreaksUpLongLInes (in category 'as yet unclassified') ----- + testEncodingBreaksUpLongLInes + + | encodedString | + encodedString := QuotedPrintableMimeConverter mimeEncode: 'This is a very long message which has more than 76 characters due to this additional part of the sentence.'. + self assert: 'This is a very long message which has more than 76 characters due to this=', String crlf , ' additional part of the sentence.' equals: encodedString. + ! |
Free forum by Nabble | Edit this page |