@@ -30,10 +30,14 @@ program test_accept_line |
| 30 | 30 | if (line /= "") error stop "accept_line should return an empty line when the buffer is empty" |
| 31 | 31 | if (history_count(editor) /= 1) error stop "accept_line should not store empty lines by default" |
| 32 | 32 | |
| 33 | + call accept_line(editor, line, store_history=.true.) |
| 34 | + if (line /= "") error stop "accept_line should still return the empty line when history storage is forced" |
| 35 | + if (history_count(editor) /= 2) error stop "accept_line should store blank lines when store_history=.true." |
| 36 | + |
| 33 | 37 | call set_buffer(editor, "scratch", 8) |
| 34 | 38 | call accept_line(editor, line, store_history=.false.) |
| 35 | 39 | if (line /= "scratch") error stop "accept_line should still return the buffer when history storage is disabled" |
| 36 | | - if (history_count(editor) /= 1) error stop "accept_line should honor store_history=.false." |
| 40 | + if (history_count(editor) /= 2) error stop "accept_line should honor store_history=.false." |
| 37 | 41 | |
| 38 | 42 | call add_history_entry(editor, "echo one") |
| 39 | 43 | call add_history_entry(editor, "echo two") |
@@ -46,7 +50,7 @@ program test_accept_line |
| 46 | 50 | if (completion_count(editor) /= 0) error stop "accept_line should clear transient completion state" |
| 47 | 51 | if (editor%completion_visible) error stop "accept_line should hide the completion menu" |
| 48 | 52 | if (history_next(editor)) error stop "accept_line should clear transient history-navigation state" |
| 49 | | - if (history_count(editor) /= 4) error stop "accept_line should add accepted recalled lines to history by default" |
| 53 | + if (history_count(editor) /= 5) error stop "accept_line should add accepted recalled lines to history by default" |
| 50 | 54 | |
| 51 | 55 | contains |
| 52 | 56 | |