removed debugprintf
[CleanReadLine.git] / test.icl
1 module test
2
3 import StdEnv
4 import ReadLine
5
6 testHistory :: HistoryState
7 testHistory = {HistoryState |
8 entries=[{HistoryItem | line="custom", timestamp=""}],
9 offset=1, flags=0}
10
11 Start :: *World -> (Int, String, HistoryState, HistoryState, *World)
12 Start w
13 # (f, w) = stdio w
14 #! w = setReadLineName "Test program" w
15 #! w = usingHistory w
16 #! (_, w) = readHistory "readline.history" w
17 #! w = addHistory "testentry" w
18 #! (s, w) = readLine "first prompt: " True w
19 #! (s, w) = readLine "uparrow should word with history: " False w
20 #! (_, w) = writeHistory "readline.history" w
21 #! (i, w) = historySearch "testentry" -1 w
22 #! (oh, w) = historyGetHistoryState w
23 #! w = historySetHistoryState testHistory w
24 #! (h, w) = historyGetHistoryState w
25 #! w = clearHistory w
26 = (i, s, oh, h, w)