tests/test-commit-amend.t
changeset 21036 a1a1bd09e4f4
parent 20771 434619dae569
child 21266 19d6fec60b81
--- a/tests/test-commit-amend.t	Wed Apr 16 02:04:41 2014 +0900
+++ b/tests/test-commit-amend.t	Wed Apr 16 02:38:11 2014 +0900
@@ -827,3 +827,25 @@
   $ hg phase '.^::.'
   35: draft
   38: secret
+
+Test that amend with --edit invokes editor forcibly
+---------------------------------------------------
+
+  $ hg parents --template "{desc}\n"
+  amend as secret
+  $ HGEDITOR=cat hg commit --amend -m "editor should be suppressed"
+  $ hg parents --template "{desc}\n"
+  editor should be suppressed
+
+  $ HGEDITOR=cat hg commit --amend -m "editor should be invoked" --edit
+  editor should be invoked
+  
+  
+  HG: Enter commit message.  Lines beginning with 'HG:' are removed.
+  HG: Leave message empty to abort commit.
+  HG: --
+  HG: user: test
+  HG: branch 'silliness'
+  HG: changed obs.py
+  $ hg parents --template "{desc}\n"
+  editor should be invoked