changeset 24469:e71053ef0c46

record_curses: add test for newly added files We have a UI bug where toggling a newly added file twice in the curses interface didn't mark it as selected. This test checks that the underlying logic is working as expected, the next patch of the series fixes the UI bug.
author Laurent Charignon <lcharignon@fb.com>
date Wed, 25 Mar 2015 16:40:37 -0700
parents 016b71ea7dc7
children 76b0b0fed2e3
files tests/test-commit-interactive-curses.t
diffstat 1 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-commit-interactive-curses.t	Wed Mar 25 17:18:48 2015 -0700
+++ b/tests/test-commit-interactive-curses.t	Wed Mar 25 16:40:37 2015 -0700
@@ -181,4 +181,23 @@
   This is the second line
   This is the third line
 
+Newly added files can be selected with the curses interface
 
+  $ hg update -C .
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ echo "hello" > x
+  $ hg add x
+  $ cat <<EOF >testModeCommands
+  > TOGGLE
+  > TOGGLE
+  > X
+  > EOF
+  $ hg st
+  A x
+  ? editor.sh
+  ? testModeCommands
+  $ hg commit -i  -m "newly added file" -d "0 0"
+  $ hg st
+  ? editor.sh
+  ? testModeCommands
+