summaryrefslogtreecommitdiff
path: root/tests/test_cmd2.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-09-25 15:11:35 -0400
committerGitHub <noreply@github.com>2018-09-25 15:11:35 -0400
commit854bd1af2d29c5f2a596ab6ddd6bf8e005ae9d2b (patch)
tree96f55fda5f91a207436c8f3bc4b9e3316d85d649 /tests/test_cmd2.py
parent38aed327422e043370a92e82ed0e56381885f60e (diff)
parentdac03119e5932f8a34a1318122e2f45fa875084c (diff)
downloadcmd2-git-854bd1af2d29c5f2a596ab6ddd6bf8e005ae9d2b.tar.gz
Merge branch 'master' into alert_printer
Diffstat (limited to 'tests/test_cmd2.py')
-rw-r--r--tests/test_cmd2.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index f3ec29dc..c6a90fdf 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -1830,7 +1830,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...'