2 test_description='Test the pick command'
7 'Initialize the StGIT repository' \
10 stg new A -m "a" && echo A > a && git add a && stg refresh &&
11 stg new B -m "b" && echo B > b && git add b && stg refresh &&
12 stg branch --clone foo &&
13 stg new C -m "c" && echo C > c && git add c && stg refresh &&
14 stg new D-foo -m "d" && echo D > d && git add d && stg refresh &&
22 test "$(echo $(stg series --applied --noprefix))" = "A B C"
26 'Pick --unapplied remote patch' \
28 stg pick --unapplied --ref-branch foo --name D D-foo &&
29 test "$(echo $(stg series --applied --noprefix))" = "A B C" &&
30 test "$(echo $(stg series --unapplied --noprefix))" = "D"
34 'Pick local unapplied patch' \
37 test "$(echo $(stg series --applied --noprefix))" = "A B C D-0" &&
38 test "$(echo $(stg series --unapplied --noprefix))" = "D"
42 'Pick --fold --revert local patch' \
44 stg pick --fold --revert D &&
45 stg refresh && stg clean &&
46 test "$(echo $(stg series --applied --noprefix))" = "A B C" &&
47 test "$(echo $(stg series --unapplied --noprefix))" = "D"
51 'Pick --fold without applied patches' \
55 test "$(echo $(stg series --unapplied --noprefix))" = "A B C D" &&
56 test "$(echo $(stg status))" = "A d"