Module Name: src Committed By: christos Date: Wed Jul 27 02:18:01 UTC 2011
Modified Files: src/lib/libedit/TEST: wtc1.c Log Message: add history testing code. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libedit/TEST/wtc1.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libedit/TEST/wtc1.c diff -u src/lib/libedit/TEST/wtc1.c:1.2 src/lib/libedit/TEST/wtc1.c:1.3 --- src/lib/libedit/TEST/wtc1.c:1.2 Sun Apr 18 17:17:47 2010 +++ src/lib/libedit/TEST/wtc1.c Tue Jul 26 22:18:00 2011 @@ -14,6 +14,7 @@ static int continuation; volatile sig_atomic_t gotsig; +static const char hfile[] = ".whistory"; static wchar_t * prompt(EditLine *el) @@ -119,6 +120,7 @@ hist = history_winit(); /* Init built-in history */ history_w(hist, &ev, H_SETSIZE, 100); /* Remember 100 events */ + history_w(hist, &ev, H_LOAD, hfile); tok = tok_winit(NULL); /* Init the tokenizer */ @@ -260,6 +262,7 @@ el_end(el); tok_wend(tok); + history_w(hist, &ev, H_SAVE, hfile); history_wend(hist); fprintf(stdout, "\n");