2 # Copyright (c) 2006 Karl Hasselström
3 test_description
='Test the mail command'
7 'Initialize the StGIT repository' \
9 git repo-config stgit.sender "A U Thor <author@example.com>" &&
10 for i in 1 2 3 4 5; do
12 echo "line $i" >> foo.txt &&
14 git commit -a -m "Patch $i"
21 'Put all the patches in an mbox' \
22 'stg mail --to="Inge Ström <inge@example.com>" -a -m \
23 -t ../../templates/patchmail.tmpl > mbox0'
26 'Import the mbox and compare' \
28 t1=$(git cat-file -p $(stg id) | grep ^tree)
30 stg import -M mbox0 &&
31 t2=$(git cat-file -p $(stg id) | grep ^tree) &&