diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2012-01-18 14:03:39 +0000 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2012-01-18 14:03:39 +0000 |
commit | 6d6afe788c3ec1f320e12449eee230fb366228c5 (patch) | |
tree | a7f17b111e20dbe67bcaf5067f2ecd9c00d9f1db /t | |
parent | 82ad14175cbcc7c0c660720c7a31f8e6f1cefe4e (diff) | |
download | termo-6d6afe788c3ec1f320e12449eee230fb366228c5.tar.gz termo-6d6afe788c3ec1f320e12449eee230fb366228c5.tar.xz termo-6d6afe788c3ec1f320e12449eee230fb366228c5.zip |
Allow passing fd = -1 to constructor to make an instance not associated with an fd; must use push_bytes to provide it input
Diffstat (limited to 't')
-rw-r--r-- | t/01base.c | 2 | ||||
-rw-r--r-- | t/02getkey.c | 2 | ||||
-rw-r--r-- | t/03utf8.c | 2 | ||||
-rw-r--r-- | t/04flags.c | 2 | ||||
-rw-r--r-- | t/10keyname.c | 2 | ||||
-rw-r--r-- | t/11strfkey.c | 2 | ||||
-rw-r--r-- | t/12strpkey.c | 2 | ||||
-rw-r--r-- | t/13cmpkey.c | 2 | ||||
-rw-r--r-- | t/20canon.c | 2 |
9 files changed, 9 insertions, 9 deletions
@@ -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"); @@ -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); |