fortrangoingonforty/fgof-lineedit / 286ab78

Browse files

Test forced history

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
286ab787e895114f93b6138484a61888210e788d
Parents
22ababa
Tree
360bf7d

1 changed file

StatusFile+-
M test/test_accept_line.f90 6 2
test/test_accept_line.f90modified
@@ -30,10 +30,14 @@ program test_accept_line
3030
   if (line /= "") error stop "accept_line should return an empty line when the buffer is empty"
3131
   if (history_count(editor) /= 1) error stop "accept_line should not store empty lines by default"
3232
 
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
+
3337
   call set_buffer(editor, "scratch", 8)
3438
   call accept_line(editor, line, store_history=.false.)
3539
   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."
3741
 
3842
   call add_history_entry(editor, "echo one")
3943
   call add_history_entry(editor, "echo two")
@@ -46,7 +50,7 @@ program test_accept_line
4650
   if (completion_count(editor) /= 0) error stop "accept_line should clear transient completion state"
4751
   if (editor%completion_visible) error stop "accept_line should hide the completion menu"
4852
   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"
5054
 
5155
 contains
5256