Mercurial > hg
comparison tests/test-patchbomb @ 8332:3e544c074459
patchbomb: quoted-printable encode overly long lines
RfC2822 mandates a line length limit of 998 byte + CRLF.
Python mail tools break lines at 990 byte. To prevent
that, we quoted-printable encode overly long lines.
author | Rocco Rutte <pdmef@gmx.net> |
---|---|
date | Fri, 08 May 2009 18:30:44 +0200 |
parents | 094e0d982c8a |
children | f28c2f8b9969 |
comparison
equal
deleted
inserted
replaced
8331:03cfc6ea93df | 8332:3e544c074459 |
---|---|
56 hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n | fixheaders > mailtest | 56 hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n | fixheaders > mailtest |
57 echo "% md5sum of 8-bit output" | 57 echo "% md5sum of 8-bit output" |
58 $TESTDIR/md5sum.py mailtest | 58 $TESTDIR/md5sum.py mailtest |
59 rm mailtest | 59 rm mailtest |
60 | 60 |
61 echo "% mime encoded mbox" | 61 echo "% mime encoded mbox (base64)" |
62 hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox | |
63 cat mbox | fixheaders | |
64 rm mbox | |
65 | |
66 echo "% mime encoded mbox (quoted-printable)" | |
67 python -c 'fp = open("qp", "wb"); fp.write("%s\nfoo\n\nbar\n" % \ | |
68 ("x" * 1024)); fp.close();' | |
69 hg commit -A -d '4 0' -m 'charset=utf-8; content-transfer-encoding: quoted-printable' | |
70 | |
71 echo "% no mime encoding for email --test" | |
72 hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n | fixheaders > mailtest | |
73 echo "% md5sum of qp output" | |
74 $TESTDIR/md5sum.py mailtest | |
75 rm mailtest | |
76 | |
77 echo "% mime encoded mbox (quoted-printable)" | |
62 hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox | 78 hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox |
63 cat mbox | fixheaders | 79 cat mbox | fixheaders |
64 rm mbox | 80 rm mbox |
65 | 81 |
66 echo "% iso-8859-1 patch" | 82 echo "% iso-8859-1 patch" |
83 | 99 |
84 echo "% test inline for single patch" | 100 echo "% test inline for single patch" |
85 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i 2 | \ | 101 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i 2 | \ |
86 fixheaders | 102 fixheaders |
87 | 103 |
104 echo "% test inline for single patch (quoted-printable)" | |
105 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i 4 | \ | |
106 fixheaders | |
107 | |
88 echo "% test inline for multiple patches" | 108 echo "% test inline for multiple patches" |
89 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i 0:1 | \ | 109 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \ |
90 fixheaders | 110 -r 0:1 -r 4 | fixheaders |
91 | 111 |
92 echo "% test attach for single patch" | 112 echo "% test attach for single patch" |
93 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a 2 | \ | 113 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a 2 | \ |
94 fixheaders | 114 fixheaders |
95 | 115 |
116 echo "% test attach for single patch (quoted-printable)" | |
117 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a 4 | \ | |
118 fixheaders | |
119 | |
96 echo "% test attach for multiple patches" | 120 echo "% test attach for multiple patches" |
97 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a 0:1 | \ | 121 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a \ |
98 fixheaders | 122 -r 0:1 -r 4 | fixheaders |
99 | 123 |
100 echo "% test intro for single patch" | 124 echo "% test intro for single patch" |
101 hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test 2 | \ | 125 hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test 2 | \ |
102 fixheaders | 126 fixheaders |
103 | 127 |