[PATCH 3 of 3] keyword: add very simple mq test

Christian Ebert blacktrash at gmx.net
Tue Jan 15 08:47:18 CST 2008


# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1200408305 -3600
# Node ID 8769229e47305f4e21a8fd6d696bf005d3e5f589
# Parent  b7304d95fc1547134473d5107dad0bfad3d3c747
keyword: add very simple mq test

diff --git a/tests/test-keyword b/tests/test-keyword
--- a/tests/test-keyword
+++ b/tests/test-keyword
@@ -3,6 +3,7 @@ cat <<EOF >> $HGRCPATH
 cat <<EOF >> $HGRCPATH
 [extensions]
 hgext.keyword =
+hgext.mq =
 [keyword]
 * =
 b = ignore
@@ -88,9 +89,19 @@ hg -v kwexpand
 hg -v kwexpand
 echo % compare changenodes in a c
 cat a c
-echo % rollback and remove c
-hg rollback
-rm c
+
+echo % qimport
+hg qimport -r tip -n mqtest.diff
+echo % keywords should not be expanded in patch
+cat .hg/patches/mqtest.diff
+echo % qpop
+hg qpop
+echo % qgoto - should imply qpush
+hg qgoto mqtest.diff
+echo % cat
+cat c
+echo % qpop and move on
+hg qpop
 
 echo % copy
 hg cp a c
diff --git a/tests/test-keyword.out b/tests/test-keyword.out
--- a/tests/test-keyword.out
+++ b/tests/test-keyword.out
@@ -162,8 +162,31 @@ xxx $
 xxx $
 $Id: c,v ba4426d1938e 1970/01/01 00:00:01 user $
 tests for different changenodes
-% rollback and remove c
-rolling back last transaction
+% qimport
+% keywords should not be expanded in patch
+# HG changeset patch
+# User User Name <user at example.com>
+# Date 1 0
+# Node ID ba4426d1938ec9673e03ab274d88c44e24618f7f
+# Parent  f782df5f9602483b4e51c31a12315f353bba380c
+cndiff
+
+diff -r f782df5f9602 -r ba4426d1938e c
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
++++ b/c	Thu Jan 01 00:00:01 1970 +0000
+@@ -0,0 +1,2 @@
++$Id$
++tests for different changenodes
+% qpop
+Patch queue now empty
+% qgoto - should imply qpush
+applying mqtest.diff
+Now at: mqtest.diff
+% cat
+$Id: c,v ba4426d1938e 1970/01/01 00:00:01 user $
+tests for different changenodes
+% qpop and move on
+Patch queue now empty
 % copy
 % kwfiles added
 a


More information about the Mercurial-devel mailing list