Skip to content

Commit 3fa8f11

Browse files
committed
Added a unit test associated with the bug fix
1 parent 007e777 commit 3fa8f11

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

tests/test_cmd2.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,17 @@ def test_history_with_span_end(base_app):
206206
""")
207207
assert out == expected
208208

209+
def test_history_with_span_index_error(base_app):
210+
run_cmd(base_app, 'help')
211+
run_cmd(base_app, 'help history')
212+
run_cmd(base_app, '!ls -hal :')
213+
out = run_cmd(base_app, 'history "hal :"')
214+
expected = normalize("""
215+
-------------------------[3]
216+
!ls -hal :
217+
""")
218+
assert out == expected
219+
209220

210221
def test_base_cmdenvironment(base_app):
211222
out = run_cmd(base_app, 'cmdenvironment')

0 commit comments

Comments
 (0)