Fix post-receive-email test for USER_EMAIL variable.
[git-central.git] / tests / t5300-script-add.sh
1 #!/bin/sh
2
3 test_description='script add'
4
5 . ./test-lib.sh
6
7 export PATH=$PATH:../../scripts
8
9 test_expect_success 'setup' '
10         echo "setup" >a &&
11         git add a &&
12         git commit -m "setup" &&
13         git clone ./. server &&
14         rm -fr server/.git/hooks &&
15         git remote add origin ./server &&
16         git checkout -b stable &&
17         git push origin stable
18 '
19
20 test_expect_success 'add picks up new files' '
21         echo "$test_name" >a.new &&
22         gc-add &&
23         git commit -m "add"
24 '
25
26 test_expect_success 'add picks up changed files' '
27         echo "$test_name" >a.new &&
28         gc-add &&
29         git commit -m "change"
30 '
31
32 test_expect_success 'add picks up removed files' '
33         rm a.new &&
34         gc-add &&
35         git commit -m "remove"
36 '
37
38 test_done
39