mirror of
https://github.com/nvbn/thefuck.git
synced 2025-10-30 14:44:05 +00:00
#324 Remove arrows in case there is only one match
This commit is contained in:
@@ -92,6 +92,13 @@ class TestSelectCommand(object):
|
||||
require_confirmation=True)) == commands[0]
|
||||
assert capsys.readouterr() == ('', u'\x1b[1K\rls [enter/↑/↓/ctrl+c]\n')
|
||||
|
||||
def test_with_confirmation_one_match(self, capsys, patch_getch, commands):
|
||||
patch_getch(['\n'])
|
||||
assert ui.select_command((commands[0],),
|
||||
Mock(debug=False, no_color=True,
|
||||
require_confirmation=True)) == commands[0]
|
||||
assert capsys.readouterr() == ('', u'\x1b[1K\rls [enter/ctrl+c]\n')
|
||||
|
||||
def test_with_confirmation_abort(self, capsys, patch_getch, commands):
|
||||
patch_getch([KeyboardInterrupt])
|
||||
assert ui.select_command(commands,
|
||||
|
||||
Reference in New Issue
Block a user