tests/test-keyword
branch0.9.2compat
changeset 311 6160401f94f2
parent 303 46ccec2f325f
child 324 b3abbb5cf61c
--- a/tests/test-keyword	Mon Nov 26 12:52:54 2007 +0100
+++ b/tests/test-keyword	Tue Dec 04 09:56:12 2007 +0100
@@ -6,6 +6,9 @@
 [keyword]
 * =
 b = ignore
+[hooks]
+commit=
+commit.test=cp a hooktest
 EOF
 
 echo % help
@@ -35,9 +38,19 @@
 echo % cat
 cat a b
 
-echo % default keyword expansion
+echo % addremove
+hg addremove
+echo % status
+hg status
+
+echo % default keyword expansion including commit hook
+#echo % interrupted commit should not change state or run commit hook
+#HGEDITOR=false hg --debug commit
+#echo % status
+#hg status
+
 echo % commit
-hg --debug commit -A -mab -d '0 0' -u 'User Name <user@example.com>'
+hg --debug commit -mab -d '0 0' -u 'User Name <user@example.com>'
 echo % status
 hg status
 echo % identify
@@ -47,6 +60,15 @@
 echo % hg cat
 hg cat a b
 
+echo
+echo % diff a hooktest
+diff a hooktest
+
+echo % removing commit hook from config
+sed -e '/\[hooks\]/,$ d' $HGRCPATH > $HGRCPATH.nohook
+mv $HGRCPATH.nohook $HGRCPATH
+rm hooktest
+
 echo % touch
 touch a b
 echo % status
@@ -108,11 +130,11 @@
 secondline
 EOF
 
-echo % interrupted commit
-# redirection and grep for backwards compatibility
-HGEDITOR=false hg commit 2>&1 | grep -v 'edit failed:'
-echo % status
-hg status
+#echo % interrupted commit
+## redirection and grep for backwards compatibility
+#HGEDITOR=false hg commit 2>&1 | grep -v 'edit failed:'
+#echo % status
+#hg status
 
 echo % commit
 hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'