tests/test-tag.t
branchstable
changeset 20767 bcfc4f625e57
parent 19123 a91894c8064a
child 21237 0054a77f49df
--- a/tests/test-tag.t	Wed Mar 19 01:07:41 2014 +0900
+++ b/tests/test-tag.t	Wed Mar 19 01:07:41 2014 +0900
@@ -222,6 +222,27 @@
   > echo "custom tag message" > "$1"
   > echo "second line" >> "$1"
   > __EOF__
+
+at first, test saving last-message.txt
+
+  $ cat > .hg/hgrc << '__EOF__'
+  > [hooks]
+  > pretag.test-saving-lastmessage = false
+  > __EOF__
+  $ rm -f .hg/last-message.txt
+  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e
+  abort: pretag.test-saving-lastmessage hook exited with status 1
+  [255]
+  $ cat .hg/last-message.txt
+  custom tag message
+  second line
+  $ cat > .hg/hgrc << '__EOF__'
+  > [hooks]
+  > pretag.test-saving-lastmessage =
+  > __EOF__
+
+then, test custom commit message itself
+
   $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e
   $ hg log -l1 --template "{desc}\n"
   custom tag message