3 test_description
='Run "stg clean"'
7 test_expect_success
'Initialize StGit stack' '
19 test_expect_success
'Clean empty patches' '
20 [ "$(echo $(stg series --applied --noprefix))" = "e0 p0 e1" ] &&
21 [ "$(echo $(stg series --unapplied --noprefix))" = "e2" ] &&
23 [ "$(echo $(stg series --applied --noprefix))" = "p0" ] &&
24 [ "$(echo $(stg series --unapplied --noprefix))" = "" ]
27 test_expect_success
'Create a conflict' '
33 echo quux > foo.txt &&
38 test_expect_success
'Make sure conflicting patches are preserved' '
40 [ "$(echo $(stg series --applied --noprefix))" = "p0 p2 p1" ] &&
41 [ "$(echo $(stg series --unapplied --noprefix))" = "" ]