3 # Copyright (c) 2005 Junio C Hamano
6 test_description
='git mailinfo and git mailsplit test'
10 test_expect_success
'split sample box' \
11 'git mailsplit -o. ../t5100/sample.mbox >last &&
13 echo total is $last &&
16 for mail in `echo 00*`
18 test_expect_success
"mailinfo $mail" \
19 "git mailinfo -u msg$mail patch$mail <$mail >info$mail &&
21 diff ../t5100/msg$mail msg$mail &&
23 diff ../t5100/patch$mail patch$mail &&
25 diff ../t5100/info$mail info$mail"
28 test_expect_success
'respect NULs' '
30 git mailsplit -d3 -o. ../t5100/nul &&
31 cmp ../t5100/nul 001 &&
32 (cat 001 | git mailinfo msg patch) &&
33 test 4 = $(wc -l < patch)
37 test_expect_success
'Preserve NULs out of MIME encoded message' '
39 git mailsplit -d5 -o. ../t5100/nul-b64.in &&
40 cmp ../t5100/nul-b64.in 00001 &&
41 git mailinfo msg patch <00001 &&
42 cmp ../t5100/nul-b64.expect patch