##// END OF EJS Templates
patchbomb: make test markers more syntax highlighter friendly
Peter Arrenbrecht -
r7357:6eb38b2d default
parent child Browse files
Show More
@@ -1,70 +1,70 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 fixheaders()
3 fixheaders()
4 {
4 {
5 sed -e 's/\(Message-Id:.*@\).*/\1/' \
5 sed -e 's/\(Message-Id:.*@\).*/\1/' \
6 -e 's/\(In-Reply-To:.*@\).*/\1/' \
6 -e 's/\(In-Reply-To:.*@\).*/\1/' \
7 -e 's/===.*/===/'
7 -e 's/===.*/===/'
8 }
8 }
9
9
10 echo "[extensions]" >> $HGRCPATH
10 echo "[extensions]" >> $HGRCPATH
11 echo "patchbomb=" >> $HGRCPATH
11 echo "patchbomb=" >> $HGRCPATH
12
12
13 hg init t
13 hg init t
14 cd t
14 cd t
15 echo a > a
15 echo a > a
16 hg commit -Ama -d '1 0'
16 hg commit -Ama -d '1 0'
17
17
18 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar tip | \
18 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar tip | \
19 fixheaders
19 fixheaders
20
20
21 echo b > b
21 echo b > b
22 hg commit -Amb -d '2 0'
22 hg commit -Amb -d '2 0'
23
23
24 hg email --date '1970-1-1 0:2' -n -f quux -t foo -c bar -s test 0:tip | \
24 hg email --date '1970-1-1 0:2' -n -f quux -t foo -c bar -s test 0:tip | \
25 fixheaders
25 fixheaders
26
26
27 hg email -m test.mbox -f quux -t foo -c bar -s test 0:tip
27 hg email -m test.mbox -f quux -t foo -c bar -s test 0:tip
28
28
29 cd ..
29 cd ..
30
30
31 hg clone -q t t2
31 hg clone -q t t2
32 cd t2
32 cd t2
33 echo c > c
33 echo c > c
34 hg commit -Amc -d '3 0'
34 hg commit -Amc -d '3 0'
35
35
36 cat > description <<EOF
36 cat > description <<EOF
37 a multiline
37 a multiline
38
38
39 description
39 description
40 EOF
40 EOF
41
41
42 echo % test bundle and description
42 echo "% test bundle and description"
43 hg email --date '1970-1-1 0:3' -n -f quux -t foo \
43 hg email --date '1970-1-1 0:3' -n -f quux -t foo \
44 -c bar -s test -r tip -b --desc description | \
44 -c bar -s test -r tip -b --desc description | \
45 fixheaders
45 fixheaders
46
46
47 echo % utf-8 patch
47 echo "% utf-8 patch"
48 python -c 'fp = open("utf", "wb"); fp.write("h\xC3\xB6mma!\n"); fp.close();'
48 python -c 'fp = open("utf", "wb"); fp.write("h\xC3\xB6mma!\n"); fp.close();'
49 hg commit -A -d '4 0' -m 'charset=utf-8; content-transfer-encoding: base64'
49 hg commit -A -d '4 0' -m 'charset=utf-8; content-transfer-encoding: base64'
50
50
51 echo % no mime encoding for email --test
51 echo "% no mime encoding for email --test"
52 hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n | fixheaders > mailtest
52 hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n | fixheaders > mailtest
53 echo % md5sum of 8-bit output
53 echo "% md5sum of 8-bit output"
54 $TESTDIR/md5sum.py mailtest
54 $TESTDIR/md5sum.py mailtest
55 rm mailtest
55 rm mailtest
56
56
57 echo % mime encoded mbox
57 echo "% mime encoded mbox"
58 hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox
58 hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox
59 cat mbox | fixheaders
59 cat mbox | fixheaders
60 rm mbox
60 rm mbox
61
61
62 echo % iso-8859-1 patch
62 echo "% iso-8859-1 patch"
63 python -c 'fp = open("isolatin", "wb"); fp.write("h\xF6mma!\n"); fp.close();'
63 python -c 'fp = open("isolatin", "wb"); fp.write("h\xF6mma!\n"); fp.close();'
64 hg commit -A -d '5 0' -m 'charset=us-ascii; content-transfer-encoding: 8bit'
64 hg commit -A -d '5 0' -m 'charset=us-ascii; content-transfer-encoding: 8bit'
65
65
66 echo % fake ascii mbox
66 echo "% fake ascii mbox"
67 hg email --date '1970-1-1 0:5' -f quux -t foo -c bar -r tip -m mbox
67 hg email --date '1970-1-1 0:5' -f quux -t foo -c bar -r tip -m mbox
68 fixheaders < mbox > mboxfix
68 fixheaders < mbox > mboxfix
69 echo % md5sum of 8-bit output
69 echo "% md5sum of 8-bit output"
70 $TESTDIR/md5sum.py mboxfix
70 $TESTDIR/md5sum.py mboxfix
General Comments 0
You need to be logged in to leave comments. Login now