diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-09-25 15:11:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-25 15:11:23 -0400 |
commit | 8e714794b875bc71941a38f9bfae31b38b4a9d34 (patch) | |
tree | bbdbec7123e2597d8a582a1637f6cb59ef6b2a9a /tests/test_cmd2.py | |
parent | d3c8efdc5a9fe8a57139f19270aee1be794ec299 (diff) | |
parent | dac03119e5932f8a34a1318122e2f45fa875084c (diff) | |
download | cmd2-git-8e714794b875bc71941a38f9bfae31b38b4a9d34.tar.gz |
Merge branch 'master' into colorize
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 92832e2f..d2f9c934 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -1837,7 +1837,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...' |