Skip to content

Commit 1cf0e9c

Browse files
committed
Updated unit test
1 parent 8801b8c commit 1cf0e9c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test_cmd2.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,15 +1601,15 @@ def test_alias_create(base_app):
16011601
assert out == normalize('alias create fake pyscript')
16021602

16031603
def test_alias_create_with_quoted_value(base_app):
1604-
"""Demonstrate that quotes in alias value will be preserved (except for redirectors)"""
1604+
"""Demonstrate that quotes in alias value will be preserved (except for redirectors and terminators)"""
16051605

16061606
# Create the alias
1607-
out, err = run_cmd(base_app, 'alias create fake help ">" "out file.txt"')
1607+
out, err = run_cmd(base_app, 'alias create fake help ">" "out file.txt" ";"')
16081608
assert out == normalize("Alias 'fake' created")
16091609

16101610
# Look up the new alias (Only the redirector should be unquoted)
16111611
out, err = run_cmd(base_app, 'alias list fake')
1612-
assert out == normalize('alias create fake help > "out file.txt"')
1612+
assert out == normalize('alias create fake help > "out file.txt" ;')
16131613

16141614
@pytest.mark.parametrize('alias_name', invalid_command_name)
16151615
def test_alias_create_invalid_name(base_app, alias_name, capsys):
@@ -1692,14 +1692,14 @@ def test_macro_create(base_app):
16921692
assert out == normalize('macro create fake pyscript')
16931693

16941694
def test_macro_create_with_quoted_value(base_app):
1695-
"""Demonstrate that quotes in macro value will be preserved (except for redirectors)"""
1695+
"""Demonstrate that quotes in macro value will be preserved (except for redirectors and terminators)"""
16961696
# Create the macro
1697-
out, err = run_cmd(base_app, 'macro create fake help ">" "out file.txt"')
1697+
out, err = run_cmd(base_app, 'macro create fake help ">" "out file.txt" ";"')
16981698
assert out == normalize("Macro 'fake' created")
16991699

17001700
# Look up the new macro (Only the redirector should be unquoted)
17011701
out, err = run_cmd(base_app, 'macro list fake')
1702-
assert out == normalize('macro create fake help > "out file.txt"')
1702+
assert out == normalize('macro create fake help > "out file.txt" ;')
17031703

17041704
@pytest.mark.parametrize('macro_name', invalid_command_name)
17051705
def test_macro_create_invalid_name(base_app, macro_name):

0 commit comments

Comments
 (0)