tests: add test to show topics working with shelve
authorPulkit Goyal <7895pulkit@gmail.com>
Thu, 29 Jun 2017 00:11:07 +0530
changeset 2680 d5eb5269128a
parent 2679 5156a67f66a6
child 2681 aa4db71a6224
tests: add test to show topics working with shelve
tests/test-topic-shelve.t
--- /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)