aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@gmail.com>2009-12-03 22:37:04 +0000
committerCatalin Marinas <catalin.marinas@gmail.com>2009-12-03 22:37:04 +0000
commiteef399a64b475b335821c2acc94864f37ab54ce9 (patch)
tree47a55657b908e6a40d746012b0e9e59787b40940
parentb57654e6e7ffd90785f6f689786f9564f6f48eb6 (diff)
parent08a1d356dc02c02f99a6cc6064a5e425bc0b23c6 (diff)
downloadstgit-eef399a64b475b335821c2acc94864f37ab54ce9.tar.gz
Merge commit 'kha/safe'
-rwxr-xr-xt/t3103-undo-hard.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/t/t3103-undo-hard.sh b/t/t3103-undo-hard.sh
index ce71668..2d0f382 100755
--- a/t/t3103-undo-hard.sh
+++ b/t/t3103-undo-hard.sh
@@ -21,7 +21,8 @@ test_expect_success 'Initialize StGit stack with three patches' '
git commit -a -m p2 &&
echo 333 >> a &&
git commit -a -m p3 &&
- stg uncommit -n 3
+ stg uncommit -n 3 &&
+ test "$(stg id)" = "$(stg id $(stg top))"
'
cat > expected.txt <<EOF
@@ -31,23 +32,26 @@ test_expect_success 'Pop middle patch, creating a conflict' '
conflict stg pop p2 &&
stg status a > actual.txt &&
test_cmp expected.txt actual.txt &&
- test "$(echo $(stg series))" = "+ p1 > p3 - p2"
+ test "$(echo $(stg series))" = "+ p1 > p3 - p2" &&
+ test "$(stg id)" = "$(stg id $(stg top))"
'
test_expect_success 'Try to undo without --hard' '
command_error stg undo &&
stg status a > actual.txt &&
test_cmp expected.txt actual.txt &&
- test "$(echo $(stg series))" = "+ p1 > p3 - p2"
+ test "$(echo $(stg series))" = "+ p1 > p3 - p2" &&
+ test "$(stg id)" = "$(stg id $(stg top))"
'
cat > expected.txt <<EOF
EOF
-test_expect_success 'Try to undo with --hard' '
+test_expect_failure 'Try to undo with --hard' '
stg undo --hard &&
stg status a > actual.txt &&
test_cmp expected.txt actual.txt &&
- test "$(echo $(stg series))" = "> p1 - p2 - p3"
+ test "$(echo $(stg series))" = "> p1 - p2 - p3" &&
+ test "$(stg id)" = "$(stg id $(stg top))"
'
test_done