diff options
Diffstat (limited to 'regress/lib/libedit/readline/history.c')
-rw-r--r-- | regress/lib/libedit/readline/history.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/regress/lib/libedit/readline/history.c b/regress/lib/libedit/readline/history.c index 002b74d66d8..57001e7eb61 100644 --- a/regress/lib/libedit/readline/history.c +++ b/regress/lib/libedit/readline/history.c @@ -150,6 +150,7 @@ test_remove(void) add_history("111"); add_history("222"); add_history("333"); + add_history("444"); /* Remove the second item "222"; the index is zero-based. */ remove_history(1); @@ -171,6 +172,12 @@ test_remove(void) if (he == NULL || strcmp(he->line, "333") != 0) ok = 0; + /* Remove the new second item "333". */ + remove_history(1); + he = history_get(history_base + 1); + if (he == NULL || strcmp(he->line, "444") != 0) + ok = 0; + clear_history(); return ok; } |