~vcs-imports/samba/main

« back to all changes in this revision

Viewing changes to source/torture/t_strcmp.c

  • Committer: jerry
  • Date: 2006-07-14 21:48:39 UTC
  • Revision ID: vcs-imports@canonical.com-20060714214839-586d8c489a8fcead
gutting trunk to move to svn:externals

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2003 by Martin Pool
3
 
 *
4
 
 * Test harness for StrCaseCmp
5
 
 */
6
 
 
7
 
#include "includes.h"
8
 
 
9
 
int main(int argc, char *argv[])
10
 
{
11
 
        int i, ret;
12
 
        int iters = 1;
13
 
        
14
 
        /* Needed to initialize character set */
15
 
        lp_load("/dev/null", True, False, False, True);
16
 
 
17
 
        if (argc < 3) {
18
 
                fprintf(stderr, "usage: %s STRING1 STRING2 [ITERS]\n"
19
 
                        "Compares two strings, prints the results of StrCaseCmp\n",
20
 
                        argv[0]);
21
 
                return 2;
22
 
        }
23
 
        if (argc >= 4)
24
 
                iters = atoi(argv[3]);
25
 
 
26
 
        for (i = 0; i < iters; i++)
27
 
                ret = StrCaseCmp(argv[1], argv[2]);
28
 
 
29
 
        printf("%d\n", ret);
30
 
        
31
 
        return 0;
32
 
}