summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test_cmd2.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index 68aa0b98..24a14ea2 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -1739,3 +1739,12 @@ def test_parseline(base_app):
assert command == 'command'
assert args == "with 'partially completed quotes"
assert line == statement.strip()
+
+
+def test_readline_remove_history_item(base_app):
+ from cmd2.rl_utils import readline
+ assert readline.get_current_history_length() == 0
+ readline.add_history('this is a test')
+ assert readline.get_current_history_length() == 1
+ readline.remove_history_item(0)
+ assert readline.get_current_history_length() == 0