From 8801b8cba5dc8c91b22d502b6d82959531cb596e Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Sun, 5 May 2019 22:31:45 -0400 Subject: Broke _complete_statement into 2 functions. Fixed issue where terminators could not be used in alias/macro values. --- tests/test_cmd2.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') 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}') -- cgit v1.2.1