3 # Copyright (c) 2010 Juergen Wieferink
6 test_description
='Test repair with hidden patches
13 'Initialize the StGIT repository' \
15 stg new A -m "a" && echo A >a.txt && stg add a.txt && stg refresh &&
16 stg new B -m "b" && echo B >b.txt && stg add b.txt && stg refresh &&
17 stg new C -m "c" && echo C >c.txt && stg add c.txt && stg refresh &&
18 stg new D -m "d" && echo D >d.txt && stg add d.txt && stg refresh &&
19 stg pop && stg hide D &&
21 test "$(echo $(stg series --applied --noprefix))" = "A B" &&
22 test "$(echo $(stg series --unapplied --noprefix))" = "C" &&
23 test "$(echo $(stg series --hidden --noprefix))" = "D"
27 'Repair and check that nothing has changed' \
29 test "$(echo $(stg series --applied --noprefix))" = "A B" &&
30 test "$(echo $(stg series --unapplied --noprefix))" = "C" &&
31 test "$(echo $(stg series --hidden --noprefix))" = "D"
36 'echo Z >z.txt && git add z.txt && git commit -m z &&
38 test "$(echo $(stg series --applied --noprefix))" = "A B z" &&
39 test "$(echo $(stg series --unapplied --noprefix))" = "C" &&
40 test "$(echo $(stg series --hidden --noprefix))" = "D"