summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-05-05 22:31:45 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-05-05 22:31:45 -0400
commit8801b8cba5dc8c91b22d502b6d82959531cb596e (patch)
treeab97389b6ba25371ead77385d526b125dee60a36 /tests
parent7a08201916b5862e8e51d3398a9fec1e5dff354f (diff)
downloadcmd2-git-8801b8cba5dc8c91b22d502b6d82959531cb596e.tar.gz
Broke _complete_statement into 2 functions.
Fixed issue where terminators could not be used in alias/macro values.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_cmd2.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index 74eb8c9b..22f250ac 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -1712,6 +1712,11 @@ def test_macro_create_with_alias_name(base_app):
out, err = run_cmd(base_app, 'macro create {} help'.format(macro))
assert "Macro cannot have the same name as an alias" in err[0]
+def test_macro_create_with_command_name(base_app):
+ macro = "my_macro"
+ out, err = run_cmd(base_app, 'macro create help stuff')
+ assert "Macro cannot have the same name as a command" in err[0]
+
def test_macro_create_with_args(base_app):
# Create the macro
out, err = run_cmd(base_app, 'macro create fake {1} {2}')