Patchwork [4,of,6,topic-experiment] tests: add test to show topics working with shelve

login
register
mail settings
Submitter Pulkit Goyal
Date June 28, 2017, 9:08 p.m.
Message ID <d1083a0b28ba3b13e410.1498684106@workspace>
Download mbox | patch
Permalink /patch/21810/
State Accepted
Headers show

Comments

Pulkit Goyal - June 28, 2017, 9:08 p.m.
# HG changeset patch
# User Pulkit Goyal <7895pulkit@gmail.com>
# Date 1498675267 -19800
#      Thu Jun 29 00:11:07 2017 +0530
# Node ID d1083a0b28ba3b13e41047c0a127cc8d585387af
# Parent  95eb263307c3f8f514f1c9cb5e15b8d8284b418a
# EXP-Topic resolvetopic
tests: add test to show topics working with shelve

Patch

diff --git a/tests/test-topic-shelve.t b/tests/test-topic-shelve.t
new file mode 100644
--- /dev/null
+++ b/tests/test-topic-shelve.t
@@ -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)