From patchwork Fri Oct 10 15:09:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [5, of, 5, V2] test-commandserver: make sure prompt does not echo input by default From: Yuya Nishihara X-Patchwork-Id: 6178 Message-Id: <9be8527abfb2025df426.1412953761@mimosa> To: mercurial-devel@selenic.com Date: Sat, 11 Oct 2014 00:09:21 +0900 # HG changeset patch # User Yuya Nishihara # 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 <> .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: