Remove R_TIMEOUT

Promote timeout to a char_event_type_t, moving it out of the "char" namespace.
This will help simplify the readline implementation.
This commit is contained in:
ridiculousfish
2019-03-15 01:11:15 -07:00
parent a2a9709fd9
commit 185805641c
7 changed files with 234 additions and 165 deletions

View File

@@ -2996,9 +2996,12 @@ static void test_input() {
}
// Now test.
wint_t c = input_readch();
if (c != R_DOWN_LINE) {
err(L"Expected to read char R_DOWN_LINE, but instead got %ls\n", describe_char(c).c_str());
auto evt = input_readch();
if (!evt.is_char()) {
err(L"Event is not a char");
} else if (evt.get_char() != R_DOWN_LINE) {
err(L"Expected to read char R_DOWN_LINE, but instead got %ls\n",
describe_char(evt.get_char()).c_str());
}
}