tests/test-commit-interactive-curses.t
changeset 27156 55fa7c3900ae
parent 26781 1aee2ab0f902
child 27321 dcdf0a52ad36
--- a/tests/test-commit-interactive-curses.t	Mon Nov 30 16:35:21 2015 -0800
+++ b/tests/test-commit-interactive-curses.t	Mon Nov 30 16:37:42 2015 -0800
@@ -71,6 +71,7 @@
 - unfold it
 - go down to second hunk (1 for the first hunk, 1 for the first hunkline, 1 for the second hunk, 1 for the second hunklike)
 - toggle the second hunk
+- toggle on and off the amend mode (to check that it toggles off)
 - edit the hunk and quit the editor immediately with non-zero status
 - commit
 
@@ -88,6 +89,8 @@
   > KEY_DOWN
   > KEY_DOWN
   > TOGGLE
+  > a
+  > a
   > e
   > X
   > EOF
@@ -166,3 +169,23 @@
   $ hg st
   ? testModeCommands
 
+Amend option works
+  $ echo "hello world" > x
+  $ hg diff -c .
+  diff -r a6735021574d -r 2b0e9be4d336 x
+  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  +++ b/x	Thu Jan 01 00:00:00 1970 +0000
+  @@ -0,0 +1,1 @@
+  +hello
+  $ cat <<EOF >testModeCommands
+  > a
+  > X
+  > EOF
+  $ hg commit -i  -m "newly added file" -d "0 0"
+  saved backup bundle to $TESTTMP/a/.hg/strip-backup/2b0e9be4d336-28bbe4e2-amend-backup.hg (glob)
+  $ hg diff -c .
+  diff -r a6735021574d -r c1d239d165ae x
+  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  +++ b/x	Thu Jan 01 00:00:00 1970 +0000
+  @@ -0,0 +1,1 @@
+  +hello world