aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/unit1301.c
blob: 6f01e2dae439944d36aac9ae8753c503c4b6039e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <stdlib.h>
#include "curl_config.h"
#include "setup.h"

#include "strequal.h"
#include "curlcheck.h"

static void unit_setup( void ) {}
static void unit_stop( void ) {}

UNITTEST_START

int rc;

rc = curl_strequal("iii", "III");
fail_unless( rc != 0 , "return code should be zero" );

rc = curl_strequal("iiia", "III");
fail_unless( rc == 0 , "return code should be zero" );

rc = curl_strequal("iii", "IIIa");
fail_unless( rc == 0 , "return code should be zero" );

rc = curl_strequal("iiiA", "IIIa");
fail_unless( rc != 0 , "return code should be non-zero" );

rc = curl_strnequal("iii", "III", 3);
fail_unless( rc != 0 , "return code should be non-zero" );

rc = curl_strnequal("iiiABC", "IIIcba", 3);
fail_unless( rc != 0 , "return code should be non-zero" );

rc = curl_strnequal("ii", "II", 3);
fail_unless( rc != 0 , "return code should be non-zero" );

UNITTEST_STOP