From 9938103fc5b4082d84f21eca0668b3b58913c895 Mon Sep 17 00:00:00 2001 Message-Id: <9938103fc5b4082d84f21eca0668b3b58913c895.1715211700.git.mdw@distorted.org.uk> From: Mark Wooding Date: Fri, 7 Dec 2007 21:16:36 +0000 Subject: [PATCH] Add a test for the 'mail --attach' command Organization: Straylight/Edgeware From: Catalin Marinas Signed-off-by: Catalin Marinas --- t/t1900-mail.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/t/t1900-mail.sh b/t/t1900-mail.sh index 78050db..e83b2d3 100755 --- a/t/t1900-mail.sh +++ b/t/t1900-mail.sh @@ -32,4 +32,19 @@ test_expect_success \ [ "$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 -- [mdw]