diff options
author | Daniel Stenberg <daniel@haxx.se> | 2016-09-30 17:15:05 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-10-31 08:46:35 +0100 |
commit | 502acba2af821391b85a2cd4ac7b91ad8e9d4180 (patch) | |
tree | e219be1178db413bffd92033e965c1e1075c4702 /tests/unit | |
parent | 1833a45dde4d27febfce42813699533b1ae993d1 (diff) |
strcasecompare: is the new name for strequal()
... to make it less likely that we forget that the function actually
does case insentive compares. Also replaced several invokes of the
function with a plain strcmp when case sensitivity is not an issue (like
comparing with "-").
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/unit1301.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/unit/unit1301.c b/tests/unit/unit1301.c index 928076e29..0d6c0cdef 100644 --- a/tests/unit/unit1301.c +++ b/tests/unit/unit1301.c @@ -21,7 +21,7 @@ ***************************************************************************/ #include "curlcheck.h" -#include "strequal.h" +#include "strcase.h" static CURLcode unit_setup(void) {return CURLE_OK;} static void unit_stop(void) {} @@ -30,25 +30,25 @@ UNITTEST_START int rc; -rc = curl_strequal("iii", "III"); +rc = curl_strcasecompare("iii", "III"); fail_unless(rc != 0, "return code should be zero"); -rc = curl_strequal("iiia", "III"); +rc = curl_strcasecompare("iiia", "III"); fail_unless(rc == 0, "return code should be zero"); -rc = curl_strequal("iii", "IIIa"); +rc = curl_strcasecompare("iii", "IIIa"); fail_unless(rc == 0, "return code should be zero"); -rc = curl_strequal("iiiA", "IIIa"); +rc = curl_strcasecompare("iiiA", "IIIa"); fail_unless(rc != 0, "return code should be non-zero"); -rc = curl_strnequal("iii", "III", 3); +rc = curl_strncasecompare("iii", "III", 3); fail_unless(rc != 0, "return code should be non-zero"); -rc = curl_strnequal("iiiABC", "IIIcba", 3); +rc = curl_strncasecompare("iiiABC", "IIIcba", 3); fail_unless(rc != 0, "return code should be non-zero"); -rc = curl_strnequal("ii", "II", 3); +rc = curl_strncasecompare("ii", "II", 3); fail_unless(rc != 0, "return code should be non-zero"); UNITTEST_STOP |