1N/A/*
1N/A * Copyright (c) 2001 Sendmail, Inc. and its suppliers.
1N/A * All rights reserved.
1N/A *
1N/A * By using this file, you agree to the terms and conditions set
1N/A * forth in the LICENSE file which can be found at the top level of
1N/A * the sendmail distribution.
1N/A */
1N/A
1N/A#pragma ident "%Z%%M% %I% %E% SMI"
1N/A
1N/A#include <sm/gen.h>
1N/ASM_IDSTR(id, "@(#)$Id: t-strrevcmp.c,v 1.1 2001/07/16 21:35:28 ca Exp $")
1N/A
1N/A#include <sm/exc.h>
1N/A#include <sm/io.h>
1N/A#include <sm/string.h>
1N/A#include <sm/test.h>
1N/A
1N/Aint
1N/Amain(argc, argv)
1N/A int argc;
1N/A char **argv;
1N/A{
1N/A char *s1;
1N/A char *s2;
1N/A
1N/A sm_test_begin(argc, argv, "test string compare");
1N/A
1N/A s1 = "equal";
1N/A s2 = "equal";
1N/A SM_TEST(sm_strrevcmp(s1, s2) == 0);
1N/A
1N/A s1 = "equal";
1N/A s2 = "qual";
1N/A SM_TEST(sm_strrevcmp(s1, s2) > 0);
1N/A
1N/A s1 = "qual";
1N/A s2 = "equal";
1N/A SM_TEST(sm_strrevcmp(s1, s2) < 0);
1N/A
1N/A s1 = "Equal";
1N/A s2 = "equal";
1N/A SM_TEST(sm_strrevcmp(s1, s2) < 0);
1N/A
1N/A s1 = "Equal";
1N/A s2 = "equal";
1N/A SM_TEST(sm_strrevcasecmp(s1, s2) == 0);
1N/A
1N/A s1 = "Equal";
1N/A s2 = "eQuaL";
1N/A SM_TEST(sm_strrevcasecmp(s1, s2) == 0);
1N/A
1N/A return sm_test_end();
1N/A}