TestCase subclass: #QuotedPrintableCoderTest classInstanceVariableNames: '' instanceVariableNames: 'coder ' classVariableNames: '' poolDictionaries: ''! !QuotedPrintableCoderTest publicMethods ! setUp coder := QuotedPrintableCoder! testDecodeCRLF self assert: (coder decode: 'This is the first line=0D=0A and this is the second') = 'This is the first line and this is the second'! testDecodeDecodedStrings self assert: (coder decode: 'H���tten H���te ein ��� im Namen, w���ren sie m���glicherweise keine H���te mehr') = 'H���tten H���te ein ��� im Namen, w���ren sie m���glicherweise keine H���te mehr'! testDecodeSimpleStrings self assert: (coder decode: 'Z=FCrich')= 'Z���rich'. self assert: (coder decode: 'H=E4tten H=FCte ein =DF im Namen, w=E4ren sie m=F6glicherweise keine H=FCte mehr') = 'H���tten H���te ein ��� im Namen, w���ren sie m���glicherweise keine H���te mehr'! testDecodeSoftLinebreak self assert: (coder decode: 'This is text may not be= decoded as two lines') = 'This is text may not be decoded as two lines'! testEncodeCRLF self assert: (coder encode: 'This is the first line and this is the second') = 'This is the first line=0D=0A and this is the second'! testEncodeEncodedStrings "An = becomes =3D and is then not decodable any more (only if you know you have to do it twice ;-) )" self assert: (coder encode: 'Z=FCrich')= 'Z=3DFCrich'.! testEncodeSimpleStrings self assert: (coder encode: 'Z���rich')= 'Z=FCrich'. self assert: (coder encode: '���ber die F���hrverbindungen nach F���hr w������te ich nicht viel') = '=DCber die F=E4hrverbindungen nach F=F6hr w=FC=DFte ich nicht viel'! testEncodeSoftLinebreak | original encoded | original := 'Cowards die many times before their deaths; The valiant never taste of death but once. Of all the wonders that I yet have heard, it seems to me most strange that men should fear; Seeing that death, a necessary end, will come when it will come'. encoded := 'Cowards die many times before their deaths; The valiant never taste of dea= th but once.=0D=0AOf all the wonders that I yet have heard, it seems to me most strange that= men should fear;=0D=0ASeeing that death, a necessary end, will come when it will come'. self assert: (coder encode: original) = encoded. self assert: (coder decode: encoded) = original.! ! QuotedPrintableCoderTest initializeAfterLoad!