[PATCH 5 of 5 V2] test-commandserver: make sure prompt does not echo input by default

Yuya Nishihara yuya at tcha.org
Fri Oct 10 10:09:21 CDT 2014


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1412769061 -32400
#      Wed Oct 08 20:51:01 2014 +0900
# Node ID 9be8527abfb2025df426db3c362846d21493e538
# Parent  6dcb36c1781c7afbdcee20c793be20e90854e391
test-commandserver: make sure prompt does not echo input by default

diff --git a/tests/test-commandserver.t b/tests/test-commandserver.t
--- a/tests/test-commandserver.t
+++ b/tests/test-commandserver.t
@@ -497,6 +497,9 @@ check that local configs for the cached 
   > @command("debuggetpass", norepo=True)
   > def debuggetpass(ui):
   >     ui.write("%s\\n" % ui.getpass())
+  > @command("debugprompt", norepo=True)
+  > def debugprompt(ui):
+  >     ui.write("%s\\n" % ui.prompt("prompt:"))
   > EOF
   $ cat <<EOF >> .hg/hgrc
   > [extensions]
@@ -511,8 +514,13 @@ check that local configs for the cached 
   ...     runcommand(server, ['debuggetpass', '--config',
   ...                         'ui.interactive=True'],
   ...                input=cStringIO.StringIO('1234\n'))
+  ...     runcommand(server, ['debugprompt', '--config',
+  ...                         'ui.interactive=True'],
+  ...                input=cStringIO.StringIO('5678\n'))
   *** runcommand debuggetpass --config ui.interactive=True
   password: 1234
+  *** runcommand debugprompt --config ui.interactive=True
+  prompt: 5678
 
 
 start without repository:


More information about the Mercurial-devel mailing list