# HG changeset patch # User Christian Ebert # Date 1194700092 -3600 # Node ID 343c5dd8dcda2a9de958c4004b6967b8abc7af22 # Parent a7d568671575a5bced7ae11791ab2196748debec Add commit hook test diff -r a7d568671575 -r 343c5dd8dcda tests/test-keyword --- a/tests/test-keyword Sat Nov 10 14:06:59 2007 +0100 +++ b/tests/test-keyword Sat Nov 10 14:08:12 2007 +0100 @@ -6,6 +6,9 @@ [keyword] * = b = ignore +[hooks] +commit= +commit.test=cp a hooktest EOF echo % help @@ -37,7 +40,7 @@ echo % cat cat sym a b -echo % default keyword expansion +echo % default keyword expansion including commit hook echo % commit hg --debug commit -A -mabsym -d '0 0' -u 'User Name ' echo % status @@ -50,6 +53,15 @@ hg cat sym 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 echo % touch touch a b echo % status diff -r a7d568671575 -r 343c5dd8dcda tests/test-keyword.out --- a/tests/test-keyword.out Sat Nov 10 14:06:59 2007 +0100 +++ b/tests/test-keyword.out Sat Nov 10 14:08:12 2007 +0100 @@ -96,7 +96,7 @@ do not process $Id: xxx $ ignore $Id$ -% default keyword expansion +% default keyword expansion including commit hook % commit adding a adding b @@ -105,7 +105,9 @@ b sym overwriting a expanding keywords +running hook commit.test: cp a hooktest % status +? hooktest % identify f782df5f9602 % cat @@ -122,6 +124,9 @@ xxx $ ignore $Id$ a +% diff a hooktest +% removing commit hook from config + % touch % status % update