From 0b8e1a614fae4bdbf529992f04fdaf2cff498d50 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sun, 5 Mar 2017 03:36:17 +0100 Subject: runserver: fixed request read. increased buffer --- tests/blogc-runserver/check_httpd_utils.c | 33 +------------------------------ 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'tests') diff --git a/tests/blogc-runserver/check_httpd_utils.c b/tests/blogc-runserver/check_httpd_utils.c index 36a2913..e0fabe3 100644 --- a/tests/blogc-runserver/check_httpd_utils.c +++ b/tests/blogc-runserver/check_httpd_utils.c @@ -33,8 +33,6 @@ test_readline(void **state) char *t; will_return(__wrap_read, 1234); will_return(__wrap_read, "bola"); - will_return(__wrap_read, 1234); - will_return(__wrap_read, ""); t = br_readline(1234); assert_string_equal(t, "bola"); free(t); @@ -53,36 +51,6 @@ test_readline(void **state) t = br_readline(1234); assert_string_equal(t, "bola3"); free(t); - will_return(__wrap_read, 1234); - will_return(__wrap_read, "bola"); - will_return(__wrap_read, 1234); - will_return(__wrap_read, "guda"); - will_return(__wrap_read, 1234); - will_return(__wrap_read, ""); - t = br_readline(1234); - assert_string_equal(t, "bolaguda"); - free(t); - will_return(__wrap_read, 1234); - will_return(__wrap_read, "bola1"); - will_return(__wrap_read, 1234); - will_return(__wrap_read, "bola\nguda"); - t = br_readline(1234); - assert_string_equal(t, "bola1bola"); - free(t); - will_return(__wrap_read, 1234); - will_return(__wrap_read, "bola2"); - will_return(__wrap_read, 1234); - will_return(__wrap_read, "bola\rguda"); - t = br_readline(1234); - assert_string_equal(t, "bola2bola"); - free(t); - will_return(__wrap_read, 1234); - will_return(__wrap_read, "bola3"); - will_return(__wrap_read, 1234); - will_return(__wrap_read, "bola\r\nguda"); - t = br_readline(1234); - assert_string_equal(t, "bola3bola"); - free(t); } @@ -110,6 +78,7 @@ test_hextoi(void **state) assert_int_equal(br_hextoi('C'), 12); assert_int_equal(br_hextoi('D'), 13); assert_int_equal(br_hextoi('E'), 14); + assert_int_equal(br_hextoi('F'), 15); assert_int_equal(br_hextoi('g'), -1); assert_int_equal(br_hextoi('G'), -1); assert_int_equal(br_hextoi('-'), -1); -- cgit v1.2.3-18-g5258