| 1 | #include <histedit.h> |
| 2 | #include <string.h> |
| 3 | |
| 4 | int main(void) { |
| 5 | HistEvent event; |
| 6 | History *history_state = history_init(); |
| 7 | if (!history_state) |
| 8 | return 1; |
| 9 | if (history(history_state, &event, H_SETSIZE, 4) < 0 || |
| 10 | history(history_state, &event, H_ENTER, "vinix") < 0 || |
| 11 | history(history_state, &event, H_FIRST) < 0 || |
| 12 | strcmp(event.str, "vinix") != 0) |
| 13 | return 1; |
| 14 | history_end(history_state); |
| 15 | return 0; |
| 16 | } |
| 17 |