test-mq-strip.t: add a test for strip --keep with clean working dir stable
authorSiddharth Agarwal <sid0@fb.com>
Fri, 26 Apr 2013 22:07:25 -0700
branchstable
changeset 19090 ff01506c6852
parent 19089 0509ae083ec1
child 19091 f01a351db791
test-mq-strip.t: add a test for strip --keep with clean working dir This helped uncover a bug in a patchset I've been writing.
tests/test-mq-strip.t
--- a/tests/test-mq-strip.t	Sat Apr 27 00:41:42 2013 +0200
+++ b/tests/test-mq-strip.t	Fri Apr 26 22:07:25 2013 -0700
@@ -427,9 +427,25 @@
   $ hg add b
   $ hg commit -mb
   $ touch c
+
+... with a clean working dir
+
   $ hg add c
   $ hg rm bar
   $ hg commit -mc
+  $ hg status
+  $ hg strip --keep tip
+  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
+  $ hg status
+  ! bar
+  ? c
+
+... with a dirty working dir
+
+  $ hg add c
+  $ hg rm bar
+  $ hg commit -mc
+  $ hg status
   $ echo b > b
   $ echo d > d
   $ hg strip --keep tip