From 6d6afe788c3ec1f320e12449eee230fb366228c5 Mon Sep 17 00:00:00 2001 From: Paul LeoNerd Evans Date: Wed, 18 Jan 2012 14:03:39 +0000 Subject: Allow passing fd = -1 to constructor to make an instance not associated with an fd; must use push_bytes to provide it input --- t/01base.c | 2 +- t/02getkey.c | 2 +- t/03utf8.c | 2 +- t/04flags.c | 2 +- t/10keyname.c | 2 +- t/11strfkey.c | 2 +- t/12strpkey.c | 2 +- t/13cmpkey.c | 2 +- t/20canon.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) (limited to 't') diff --git a/t/01base.c b/t/01base.c index 359c9ca..88e2c84 100644 --- a/t/01base.c +++ b/t/01base.c @@ -8,7 +8,7 @@ int main(int argc, char *argv[]) plan_tests(2); - tk = termkey_new(0, TERMKEY_FLAG_NOTERMIOS); + tk = termkey_new(-1, 0); ok(!!tk, "termkey_new"); diff --git a/t/02getkey.c b/t/02getkey.c index 6d076cb..0c893c6 100644 --- a/t/02getkey.c +++ b/t/02getkey.c @@ -12,7 +12,7 @@ int main(int argc, char *argv[]) /* Sanitise this just in case */ putenv("TERM=vt100"); - tk = termkey_new(0, TERMKEY_FLAG_NOTERMIOS); + tk = termkey_new(-1, 0); is_int(termkey_get_buffer_remaining(tk), 256, "buffer free initially 256"); diff --git a/t/03utf8.c b/t/03utf8.c index 9290613..bb97328 100644 --- a/t/03utf8.c +++ b/t/03utf8.c @@ -11,7 +11,7 @@ int main(int argc, char *argv[]) /* Sanitise this just in case */ putenv("TERM=vt100"); - tk = termkey_new(0, TERMKEY_FLAG_NOTERMIOS|TERMKEY_FLAG_UTF8); + tk = termkey_new(-1, TERMKEY_FLAG_UTF8); termkey_push_bytes(tk, "a", 1); diff --git a/t/04flags.c b/t/04flags.c index cf8e2c3..d803be8 100644 --- a/t/04flags.c +++ b/t/04flags.c @@ -12,7 +12,7 @@ int main(int argc, char *argv[]) /* Sanitise this just in case */ putenv("TERM=vt100"); - tk = termkey_new(0, TERMKEY_FLAG_NOTERMIOS); + tk = termkey_new(-1, 0); termkey_push_bytes(tk, " ", 1); diff --git a/t/10keyname.c b/t/10keyname.c index 54bc208..7a35ad7 100644 --- a/t/10keyname.c +++ b/t/10keyname.c @@ -9,7 +9,7 @@ int main(int argc, char *argv[]) plan_tests(10); - tk = termkey_new(0, TERMKEY_FLAG_NOTERMIOS); + tk = termkey_new(-1, 0); sym = termkey_keyname2sym(tk, "Space"); is_int(sym, TERMKEY_SYM_SPACE, "keyname2sym Space"); diff --git a/t/11strfkey.c b/t/11strfkey.c index bdfcf6a..67208a7 100644 --- a/t/11strfkey.c +++ b/t/11strfkey.c @@ -10,7 +10,7 @@ int main(int argc, char *argv[]) plan_tests(28); - tk = termkey_new(0, TERMKEY_FLAG_NOTERMIOS); + tk = termkey_new(-1, 0); key.type = TERMKEY_TYPE_UNICODE; key.code.codepoint = 'A'; diff --git a/t/12strpkey.c b/t/12strpkey.c index ef5acd9..f591d9b 100644 --- a/t/12strpkey.c +++ b/t/12strpkey.c @@ -11,7 +11,7 @@ int main(int argc, char *argv[]) plan_tests(53); - tk = termkey_new(0, TERMKEY_FLAG_NOTERMIOS); + tk = termkey_new(-1, 0); CLEAR_KEY; endp = termkey_strpkey(tk, "A", &key, 0); diff --git a/t/13cmpkey.c b/t/13cmpkey.c index 62902cc..13ff313 100644 --- a/t/13cmpkey.c +++ b/t/13cmpkey.c @@ -8,7 +8,7 @@ int main(int argc, char *argv[]) plan_tests(12); - tk = termkey_new(0, TERMKEY_FLAG_NOTERMIOS); + tk = termkey_new(-1, 0); key1.type = TERMKEY_TYPE_UNICODE; key1.code.codepoint = 'A'; diff --git a/t/20canon.c b/t/20canon.c index 35f84e2..ec6de1f 100644 --- a/t/20canon.c +++ b/t/20canon.c @@ -11,7 +11,7 @@ int main(int argc, char *argv[]) plan_tests(26); - tk = termkey_new(0, TERMKEY_FLAG_NOTERMIOS); + tk = termkey_new(-1, 0); CLEAR_KEY; endp = termkey_strpkey(tk, " ", &key, 0); -- cgit v1.2.3-70-g09d2