chiark / gitweb /
Fix deletion and move of a hidden patch (gna bug #9244).
[stgit] / t / t1600-delete-one.sh
index df03d79c860db85377e3bac80eab8c1aca83f6ab..d59d4baffc3b05d68c800d1016d499d0c5f611e3 100755 (executable)
@@ -81,6 +81,15 @@ test_expect_success \
     [ $(stg applied | wc -l) -eq 2 ]
     '
 
+test_expect_success \
+    'Hide the topmost patch and try to delete it' \
+    '
+    [ $(stg applied | wc -l) -eq 2 ] &&
+    stg hide bar &&
+    stg delete bar &&
+    [ $(stg applied | wc -l) -eq 1 ]
+    '
+
 test_expect_success \
     'Create another branch, and put one patch in each branch' \
     '
@@ -99,10 +108,10 @@ test_expect_success \
 test_expect_success \
     'Delete a patch in another branch' \
     '
-    [ $(stg applied | wc -l) -eq 3 ] &&
+    [ $(stg applied | wc -l) -eq 2 ] &&
     [ $(stg applied -b br | wc -l) -eq 1 ] &&
     stg delete -b br baz &&
-    [ $(stg applied | wc -l) -eq 3 ] &&
+    [ $(stg applied | wc -l) -eq 2 ] &&
     [ $(stg applied -b br | wc -l) -eq 0 ]
     '