summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test_cmd2.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index 5783d944..2198d5c0 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -206,6 +206,17 @@ shortcuts
""")
assert out == expected
+def test_history_with_span_index_error(base_app):
+ run_cmd(base_app, 'help')
+ run_cmd(base_app, 'help history')
+ run_cmd(base_app, '!ls -hal :')
+ out = run_cmd(base_app, 'history "hal :"')
+ expected = normalize("""
+-------------------------[3]
+!ls -hal :
+""")
+ assert out == expected
+
def test_base_cmdenvironment(base_app):
out = run_cmd(base_app, 'cmdenvironment')