8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / sendmail / libsm / t-strrevcmp.c
blob7ce06d5e0fe87d47becb00bd0babe80847261254
1 /*
2 * Copyright (c) 2001 Sendmail, Inc. and its suppliers.
3 * All rights reserved.
5 * By using this file, you agree to the terms and conditions set
6 * forth in the LICENSE file which can be found at the top level of
7 * the sendmail distribution.
8 */
10 #pragma ident "%Z%%M% %I% %E% SMI"
12 #include <sm/gen.h>
13 SM_IDSTR(id, "@(#)$Id: t-strrevcmp.c,v 1.1 2001/07/16 21:35:28 ca Exp $")
15 #include <sm/exc.h>
16 #include <sm/io.h>
17 #include <sm/string.h>
18 #include <sm/test.h>
20 int
21 main(argc, argv)
22 int argc;
23 char **argv;
25 char *s1;
26 char *s2;
28 sm_test_begin(argc, argv, "test string compare");
30 s1 = "equal";
31 s2 = "equal";
32 SM_TEST(sm_strrevcmp(s1, s2) == 0);
34 s1 = "equal";
35 s2 = "qual";
36 SM_TEST(sm_strrevcmp(s1, s2) > 0);
38 s1 = "qual";
39 s2 = "equal";
40 SM_TEST(sm_strrevcmp(s1, s2) < 0);
42 s1 = "Equal";
43 s2 = "equal";
44 SM_TEST(sm_strrevcmp(s1, s2) < 0);
46 s1 = "Equal";
47 s2 = "equal";
48 SM_TEST(sm_strrevcasecmp(s1, s2) == 0);
50 s1 = "Equal";
51 s2 = "eQuaL";
52 SM_TEST(sm_strrevcasecmp(s1, s2) == 0);
54 return sm_test_end();