repair: new command to repair repository state
[guilt.git] / regression / 024-unapplied.sh
blobecb0298028c18ad2b628df6705ade8eca35c63ca
1 #!/bin/bash
3 # Test the unapplied code
6 source scaffold
7 source generic_test_data
9 function expected_status_modify
11 echo "add"
12 echo "remove"
13 echo "mode"
16 function expected_status_add
18 echo "remove"
19 echo "mode"
22 function expected_status_remove
24 echo "mode"
27 function expected_status_mode
29 return 0
32 # the test itself
33 empty_repo
34 cd $REPODIR
35 guilt-init
37 generic_prepare_for_tests
39 # NOTE: this has to be in the same order as the series file
40 tests="modify add remove mode"
42 for t in $tests
44 guilt-push > /dev/null
46 guilt-unapplied > /tmp/reg.$$
48 expected_status_$t | diff -u - /tmp/reg.$$
50 echo -n "[$t] "
51 done
53 rm -f /tmp/reg.$$
55 complete_test