1 ! Copyright (C) 2009 Daniel Ehrenberg
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: tools.test quoted-printable io.encodings.string
4 sequences splitting kernel io.encodings.8-bit ;
5 IN: quoted-printable.tests
8 person who knew how to write the letters:
10 and we didn't know hów tö do thât" }
12 person who knew how to write the letters:
15 e didn't know h=F3w t=F6 do th=E2t" quoted> latin2 decode ] unit-test
17 { "Jos=E9 was the=0Aperson who knew how to write the letters:=0A =F5 and =FC=0Aand we didn't know h=F3w t=F6 do th=E2t" }
19 person who knew how to write the letters:
21 and we didn't know hów tö do thât" latin2 encode >quoted ] unit-test
24 55 [ "hello" ] replicate concat ;
26 { f } [ message >quoted "=\r\n" subseq-of? ] unit-test
27 { 1 } [ message >quoted split-lines length ] unit-test
28 { t } [ message >quoted-lines "=\r\n" subseq-of? ] unit-test
29 { 4 } [ message >quoted-lines split-lines length ] unit-test
30 { "===o" } [ message >quoted-lines split-lines [ last ] "" map-as ] unit-test