tests/test-patchbomb
changeset 7265 0cf3442ee844
parent 7193 12fc42c78598
child 7357 6eb38b2dca6c
equal deleted inserted replaced
7264:7e963c80bbe6 7265:0cf3442ee844
    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", "w"); 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 -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 -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", "w"); 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 -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