diff options
Diffstat (limited to 'tests/test_cmd2.py')
-rw-r--r-- | tests/test_cmd2.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index 17c19f2a..e3992c7b 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -1828,7 +1828,22 @@ def test_complete_unalias(base_app): # Validate that there are now completions expected = ['fake', 'fall'] - assert base_app.complete_unalias(text, line, begidx, endidx) == expected + result = base_app.complete_unalias(text, line, begidx, endidx) + assert sorted(expected) == sorted(result) + +def test_multiple_aliases(base_app): + alias1 = 'h1' + alias2 = 'h2' + run_cmd(base_app, 'alias {} help'.format(alias1)) + run_cmd(base_app, 'alias {} help -v'.format(alias2)) + out = run_cmd(base_app, alias1) + expected = normalize(BASE_HELP) + assert out == expected + + out = run_cmd(base_app, alias2) + expected = normalize(BASE_HELP_VERBOSE) + assert out == expected + def test_ppaged(base_app): msg = 'testing...' |