Help lint: check for empty description elements
[factor/jcg.git] / basis / quoted-printable / quoted-printable-tests.factor
blob6f42a48b37739a6bec1bf92d3c4b27686a8de199
1 ! Copyright (C) 2009 Daniel Ehrenberg
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: tools.test quoted-printable multiline io.encodings.string
4 sequences io.encodings.8-bit splitting kernel ;
5 IN: quoted-printable.tests
7 [ <" José was the
8 person who knew how to write the letters:
9     ő and ü 
10 and we didn't know hów tö do thât"> ]
11 [ <" Jos=E9 was the
12 person who knew how to write the letters:
13     =F5 and =FC=20
14 and w=
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"> ]
18 [ <" José was the
19 person who knew how to write the letters:
20     ő and ü
21 and we didn't know hów tö do thât"> latin2 encode >quoted ] unit-test
23 : message ( -- str )
24     55 [ "hello" ] replicate concat ;
26 [ f ] [ message >quoted "=\r\n" swap subseq? ] unit-test
27 [ 1 ] [ message >quoted string-lines length ] unit-test
28 [ t ] [ message >quoted-lines "=\r\n" swap subseq? ] unit-test
29 [ 4 ] [ message >quoted-lines string-lines length ] unit-test
30 [ "===o" ] [ message >quoted-lines string-lines [ peek ] "" map-as ] unit-test