Loading tests/unit/curlcheck.h +9 −8 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -88,7 +88,8 @@ extern int unitfail; (void)arg; \ if(unit_setup()) { \ fail("unit_setup() failure"); \ } else { } \ else { #define UNITTEST_STOP \ goto unit_test_abort; /* avoid warning */ \ Loading tests/unit/unit1300.c +3 −3 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading tests/unit/unit1302.c +9 −5 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -126,7 +126,8 @@ Curl_safefree(decoded); size = 1; /* not zero */ decoded = &anychar; /* not NULL */ rc = Curl_base64_decode("aQ", &decoded, &size); fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING"); fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING"); fail_unless(size == 0, "size should be 0"); fail_if(decoded, "returned pointer should be NULL"); Loading @@ -134,7 +135,8 @@ fail_if(decoded, "returned pointer should be NULL"); size = 1; /* not zero */ decoded = &anychar; /* not NULL */ rc = Curl_base64_decode("a===", &decoded, &size); fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING"); fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING"); fail_unless(size == 0, "size should be 0"); fail_if(decoded, "returned pointer should be NULL"); Loading @@ -142,7 +144,8 @@ fail_if(decoded, "returned pointer should be NULL"); size = 1; /* not zero */ decoded = &anychar; /* not NULL */ rc = Curl_base64_decode("a=Q=", &decoded, &size); fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING"); fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING"); fail_unless(size == 0, "size should be 0"); fail_if(decoded, "returned pointer should be NULL"); Loading @@ -150,7 +153,8 @@ fail_if(decoded, "returned pointer should be NULL"); size = 1; /* not zero */ decoded = &anychar; /* not NULL */ rc = Curl_base64_decode("a\x1f==", &decoded, &size); fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING"); fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING"); fail_unless(size == 0, "size should be 0"); fail_if(decoded, "returned pointer should be NULL"); Loading tests/unit/unit1303.c +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading tests/unit/unit1304.c +13 −9 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -72,7 +72,8 @@ UNITTEST_START abort_unless(password != NULL, "returned NULL!"); fail_unless(password[0] == 0, "password should not have been changed"); abort_unless(login != NULL, "returned NULL!"); fail_unless(strncmp(login, "me", 2) == 0, "login should not have been changed"); fail_unless(strncmp(login, "me", 2) == 0, "login should not have been changed"); /* * Test a non existent login and host in our netrc file. Loading @@ -85,7 +86,8 @@ UNITTEST_START abort_unless(password != NULL, "returned NULL!"); fail_unless(password[0] == 0, "password should not have been changed"); abort_unless(login != NULL, "returned NULL!"); fail_unless(strncmp(login, "me", 2) == 0, "login should not have been changed"); fail_unless(strncmp(login, "me", 2) == 0, "login should not have been changed"); /* * Test a non existent login (substring of an existing one) in our Loading @@ -99,7 +101,8 @@ UNITTEST_START abort_unless(password != NULL, "returned NULL!"); fail_unless(password[0] == 0, "password should not have been changed"); abort_unless(login != NULL, "returned NULL!"); fail_unless(strncmp(login, "admi", 4) == 0, "login should not have been changed"); fail_unless(strncmp(login, "admi", 4) == 0, "login should not have been changed"); /* * Test a non existent login (superstring of an existing one) Loading @@ -113,7 +116,8 @@ UNITTEST_START abort_unless(password != NULL, "returned NULL!"); fail_unless(password[0] == 0, "password should not have been changed"); abort_unless(login != NULL, "returned NULL!"); fail_unless(strncmp(login, "adminn", 6) == 0, "login should not have been changed"); fail_unless(strncmp(login, "adminn", 6) == 0, "login should not have been changed"); /* * Test for the first existing host in our netrc file Loading Loading
tests/unit/curlcheck.h +9 −8 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -88,7 +88,8 @@ extern int unitfail; (void)arg; \ if(unit_setup()) { \ fail("unit_setup() failure"); \ } else { } \ else { #define UNITTEST_STOP \ goto unit_test_abort; /* avoid warning */ \ Loading
tests/unit/unit1300.c +3 −3 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading
tests/unit/unit1302.c +9 −5 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -126,7 +126,8 @@ Curl_safefree(decoded); size = 1; /* not zero */ decoded = &anychar; /* not NULL */ rc = Curl_base64_decode("aQ", &decoded, &size); fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING"); fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING"); fail_unless(size == 0, "size should be 0"); fail_if(decoded, "returned pointer should be NULL"); Loading @@ -134,7 +135,8 @@ fail_if(decoded, "returned pointer should be NULL"); size = 1; /* not zero */ decoded = &anychar; /* not NULL */ rc = Curl_base64_decode("a===", &decoded, &size); fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING"); fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING"); fail_unless(size == 0, "size should be 0"); fail_if(decoded, "returned pointer should be NULL"); Loading @@ -142,7 +144,8 @@ fail_if(decoded, "returned pointer should be NULL"); size = 1; /* not zero */ decoded = &anychar; /* not NULL */ rc = Curl_base64_decode("a=Q=", &decoded, &size); fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING"); fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING"); fail_unless(size == 0, "size should be 0"); fail_if(decoded, "returned pointer should be NULL"); Loading @@ -150,7 +153,8 @@ fail_if(decoded, "returned pointer should be NULL"); size = 1; /* not zero */ decoded = &anychar; /* not NULL */ rc = Curl_base64_decode("a\x1f==", &decoded, &size); fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING"); fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING"); fail_unless(size == 0, "size should be 0"); fail_if(decoded, "returned pointer should be NULL"); Loading
tests/unit/unit1303.c +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading
tests/unit/unit1304.c +13 −9 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -72,7 +72,8 @@ UNITTEST_START abort_unless(password != NULL, "returned NULL!"); fail_unless(password[0] == 0, "password should not have been changed"); abort_unless(login != NULL, "returned NULL!"); fail_unless(strncmp(login, "me", 2) == 0, "login should not have been changed"); fail_unless(strncmp(login, "me", 2) == 0, "login should not have been changed"); /* * Test a non existent login and host in our netrc file. Loading @@ -85,7 +86,8 @@ UNITTEST_START abort_unless(password != NULL, "returned NULL!"); fail_unless(password[0] == 0, "password should not have been changed"); abort_unless(login != NULL, "returned NULL!"); fail_unless(strncmp(login, "me", 2) == 0, "login should not have been changed"); fail_unless(strncmp(login, "me", 2) == 0, "login should not have been changed"); /* * Test a non existent login (substring of an existing one) in our Loading @@ -99,7 +101,8 @@ UNITTEST_START abort_unless(password != NULL, "returned NULL!"); fail_unless(password[0] == 0, "password should not have been changed"); abort_unless(login != NULL, "returned NULL!"); fail_unless(strncmp(login, "admi", 4) == 0, "login should not have been changed"); fail_unless(strncmp(login, "admi", 4) == 0, "login should not have been changed"); /* * Test a non existent login (superstring of an existing one) Loading @@ -113,7 +116,8 @@ UNITTEST_START abort_unless(password != NULL, "returned NULL!"); fail_unless(password[0] == 0, "password should not have been changed"); abort_unless(login != NULL, "returned NULL!"); fail_unless(strncmp(login, "adminn", 6) == 0, "login should not have been changed"); fail_unless(strncmp(login, "adminn", 6) == 0, "login should not have been changed"); /* * Test for the first existing host in our netrc file Loading