X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/5cd9e87faa0a116ce2b378be6a5c89d5f20629f1..9938103fc5b4082d84f21eca0668b3b58913c895:/t/t1900-mail.sh diff --git a/t/t1900-mail.sh b/t/t1900-mail.sh index 4be7270..e83b2d3 100755 --- a/t/t1900-mail.sh +++ b/t/t1900-mail.sh @@ -6,7 +6,7 @@ test_description='Test the mail command' test_expect_success \ 'Initialize the StGIT repository' \ ' - git config stgit.sender "A U Thor " && + git repo-config stgit.sender "A U Thor " && for i in 1 2 3 4 5; do touch foo.txt && echo "line $i" >> foo.txt && @@ -29,7 +29,22 @@ test_expect_success \ stg pop -a && stg import -M mbox0 && t2=$(git cat-file -p $(stg id) | grep ^tree) && - [ "$t1" == "$t2" ] + [ "$t1" = "$t2" ] + ' + +test_expect_success \ + 'Put all the patches in an mbox with patch attachments' \ + 'stg mail --to="Inge Ström " -a -m \ + -t ../../templates/mailattch.tmpl > mbox1' + +test_expect_success \ + 'Import the mbox containing patch attachments and compare' \ + ' + t1=$(git cat-file -p $(stg id) | grep ^tree) + stg pop -a && + stg import -M mbox1 && + t2=$(git cat-file -p $(stg id) | grep ^tree) && + [ "$t1" = "$t2" ] ' test_done