changeset 2680:d5eb5269128a

tests: add test to show topics working with shelve
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 29 Jun 2017 00:11:07 +0530
parents 5156a67f66a6
children aa4db71a6224
files tests/test-topic-shelve.t
diffstat 1 files changed, 50 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-topic-shelve.t	Thu Jun 29 00:11:07 2017 +0530
@@ -0,0 +1,50 @@
+testing topic with shelve extension
+------------------------------------
+
+  $ . "$TESTDIR/testlib/topic_setup.sh"
+
+  $ hg init repo
+  $ cd repo
+  $ cat <<EOF >>.hg/hgrc
+  > [extensions]
+  > shelve=
+  > EOF
+
+  $ touch a
+  $ echo "Hello" >> a
+  $ hg topic "testing-shelve"
+  $ hg topic
+   * testing-shelve
+  $ hg ci -m "First commit" -A
+  adding a
+  $ hg topic
+   * testing-shelve
+  $ echo " World" >> a
+  $ hg stack
+  ### topic: testing-shelve
+  ### branch: default
+  t1@ First commit (current)
+
+shelve test
+-----------
+
+  $ hg shelve
+  shelved as default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg topic
+   * testing-shelve
+  $ hg stack
+  ### topic: testing-shelve
+  ### branch: default
+  t1@ First commit (current)
+
+unshelve test
+-------------
+  $ hg unshelve
+  unshelving change 'default'
+  $ hg topic
+   * testing-shelve
+  $ hg stack
+  ### topic: testing-shelve
+  ### branch: default
+  t1@ First commit (current)