Makefile: Forgot to add guilt-patchbomb to the list of scripts
[guilt.git] / regression / 022-applied.sh
blobddb1c1133e36eb43bd4a511ad46f090d4812bdc9
2 # Test the applied code
5 source scaffold
6 source generic_test_data
8 function expected_status_modify
10 [ ! -z "$1" ] && echo -n "291b0c3f4133842943d568e25f3a27ac0cc3a1f0:"
11 echo "modify"
14 function expected_status_add
16 [ ! -z "$1" ] && echo -n "291b0c3f4133842943d568e25f3a27ac0cc3a1f0:"
17 echo "modify"
19 [ ! -z "$1" ] && echo -n "82f68f92022dc51bed0a4099c89068d778754aad:"
20 echo "add"
23 function expected_status_remove
25 [ ! -z "$1" ] && echo -n "291b0c3f4133842943d568e25f3a27ac0cc3a1f0:"
26 echo "modify"
28 [ ! -z "$1" ] && echo -n "82f68f92022dc51bed0a4099c89068d778754aad:"
29 echo "add"
31 [ ! -z "$1" ] && echo -n "393c0de5a289e1319cee588a7890971e5b039f46:"
32 echo "remove"
35 function expected_status_mode
37 [ ! -z "$1" ] && echo -n "291b0c3f4133842943d568e25f3a27ac0cc3a1f0:"
38 echo "modify"
40 [ ! -z "$1" ] && echo -n "82f68f92022dc51bed0a4099c89068d778754aad:"
41 echo "add"
43 [ ! -z "$1" ] && echo -n "393c0de5a289e1319cee588a7890971e5b039f46:"
44 echo "remove"
46 [ ! -z "$1" ] && echo -n "5470ce3a3aea43c5fd75db78d32ba449b93df4ee:"
47 echo "mode"
50 # the test itself
51 empty_repo
52 cd $REPODIR
53 guilt-init
55 generic_prepare_for_tests
57 # NOTE: this has to be in the same order as the series file
58 tests="modify add remove mode"
60 for t in $tests
62 guilt-push > /dev/null
64 guilt-applied > /tmp/reg.$$
66 expected_status_$t | diff -u - /tmp/reg.$$
67 expected_status_$t "file" | diff -u - $REPODIR/.git/patches/master/status
69 echo -n "[$t] "
70 done
72 rm -f /tmp/reg.$$
74 complete_test