2 # Test the unapplied code
7 function prepare_for_tests
9 # set up the repo so we have something interesting to run guilt on
12 git-commit
-s -m "initial" 2> /dev
/null
> /dev
/null
14 # patch to modify a file
15 cat << DONE > .git/patches/master/modify
16 diff --git a/def b/def
17 index 8baef1b..7d69c2f 100644
25 # patch to add a new file
26 cat << DONE > .git/patches/master/add
27 diff --git a/abd b/abd
29 index 0000000..489450e
36 # patch to remove an existing file
37 cat << DONE > .git/patches/master/remove
38 diff --git a/abd b/abd
39 deleted file mode 100644
40 index 489450e..0000000
47 # patch to change a mode
48 cat << DONE > .git/patches/master/mode
49 diff --git a/def b/def
54 # the series file of all the things
55 cat << DONE > .git/patches/master/series
63 function expected_status_modify
70 function expected_status_add
76 function expected_status_remove
81 function expected_status_mode
93 # NOTE: this has to be in the same order as the series file
94 tests
="modify add remove mode"
98 guilt-push
> /dev
/null
100 guilt-unapplied
> /tmp
/reg.$$
102 expected_status_
$t |
diff -u - /tmp
/reg.$$