Debian Codegraph @

tests/t30_quoted.py

raw symbols SCIP
1 # -*- coding: utf-8 -*-
2 import common
3 from common import setup_module, teardown_module
4
5 input = '''\
6 Dear =DEorvard=F0ur,
7
8 =AB O=F9 qu'il r=E9side, =E0 N=EEmes ou m=EAme Capharna=FCm, tout Fran=E7ai=
9 s inscrit
10 au r=F4le payera son d=FB d=E8s avant No=EBl, qu'il soit na=EFf ou r=E2leur=
11 . =BB
12 Incomplete last line=
13 '''
14
15 def test_1():
16 # Block of lines from Quoted Printable.
17 common.request('qp..x1')
18 output = '''\
19 0x44, 0x65, 0x61, 0x72, 0x20, 0xDE, 0x6F, 0x72, 0x76, 0x61, 0x72, 0x64,
20 0xF0, 0x75, 0x72, 0x2C, 0x0A, 0x0A, 0xAB, 0x20, 0x4F, 0xF9, 0x20, 0x71,
21 0x75, 0x27, 0x69, 0x6C, 0x20, 0x72, 0xE9, 0x73, 0x69, 0x64, 0x65, 0x2C,
22 0x20, 0xE0, 0x20, 0x4E, 0xEE, 0x6D, 0x65, 0x73, 0x20, 0x6F, 0x75, 0x20,
23 0x6D, 0xEA, 0x6D, 0x65, 0x20, 0x43, 0x61, 0x70, 0x68, 0x61, 0x72, 0x6E,
24 0x61, 0xFC, 0x6D, 0x2C, 0x20, 0x74, 0x6F, 0x75, 0x74, 0x20, 0x46, 0x72,
25 0x61, 0x6E, 0xE7, 0x61, 0x69, 0x73, 0x20, 0x69, 0x6E, 0x73, 0x63, 0x72,
26 0x69, 0x74, 0x0A, 0x61, 0x75, 0x20, 0x72, 0xF4, 0x6C, 0x65, 0x20, 0x70,
27 0x61, 0x79, 0x65, 0x72, 0x61, 0x20, 0x73, 0x6F, 0x6E, 0x20, 0x64, 0xFB,
28 0x20, 0x64, 0xE8, 0x73, 0x20, 0x61, 0x76, 0x61, 0x6E, 0x74, 0x20, 0x4E,
29 0x6F, 0xEB, 0x6C, 0x2C, 0x20, 0x71, 0x75, 0x27, 0x69, 0x6C, 0x20, 0x73,
30 0x6F, 0x69, 0x74, 0x20, 0x6E, 0x61, 0xEF, 0x66, 0x20, 0x6F, 0x75, 0x20,
31 0x72, 0xE2, 0x6C, 0x65, 0x75, 0x72, 0x2E, 0x20, 0xBB, 0x0A, 0x49, 0x6E,
32 0x63, 0x6F, 0x6D, 0x70, 0x6C, 0x65, 0x74, 0x65, 0x20, 0x6C, 0x61, 0x73,
33 0x74, 0x20, 0x6C, 0x69, 0x6E, 0x65
34 '''
35 common.validate(input, output)
36
37 def test_2():
38 # Block of lines from Quoted Printable and back.
39 common.request('qp..x1')
40 common.validate_back(input)