Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "curlcheck.h"
00023
00024 #include "strcase.h"
00025
00026 static CURLcode unit_setup(void) {return CURLE_OK;}
00027 static void unit_stop(void) {}
00028
00029 UNITTEST_START
00030
00031 int rc;
00032
00033 rc = curl_strequal("iii", "III");
00034 fail_unless(rc != 0, "return code should be zero");
00035
00036 rc = curl_strequal("iiia", "III");
00037 fail_unless(rc == 0, "return code should be zero");
00038
00039 rc = curl_strequal("iii", "IIIa");
00040 fail_unless(rc == 0, "return code should be zero");
00041
00042 rc = curl_strequal("iiiA", "IIIa");
00043 fail_unless(rc != 0, "return code should be non-zero");
00044
00045 rc = curl_strnequal("iii", "III", 3);
00046 fail_unless(rc != 0, "return code should be non-zero");
00047
00048 rc = curl_strnequal("iiiABC", "IIIcba", 3);
00049 fail_unless(rc != 0, "return code should be non-zero");
00050
00051 rc = curl_strnequal("ii", "II", 3);
00052 fail_unless(rc != 0, "return code should be non-zero");
00053
00054 UNITTEST_STOP