testit: Test new rl_uninitialize() and load/store history

Signed-off-by: Claus Fischer <claus.fischer@clausfischer.com>
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Claus Fischer 2017-11-29 14:51:21 +01:00 committed by Joachim Nilsson
parent 317b43e488
commit 91937d970d

View File

@ -45,6 +45,8 @@ int main(int argc, char *argv[] __attribute__ ((unused)))
int doit; int doit;
char *prompt, *p; char *prompt, *p;
read_history(".testit_history");
doit = argc == 1; doit = argc == 1;
if ((prompt = getenv("TESTPROMPT")) == NULL) if ((prompt = getenv("TESTPROMPT")) == NULL)
prompt = "testit> "; prompt = "testit> ";
@ -63,6 +65,9 @@ int main(int argc, char *argv[] __attribute__ ((unused)))
free(p); free(p);
} }
write_history(".testit_history");
rl_uninitialize();
return 0; return 0;
} }