1 /*
2 * Copyright (c) 2000 Sendmail, Inc. and its suppliers.
3 * All rights reserved.
4 *
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 */
9
10 #pragma ident "%Z%%M% %I% %E% SMI"
11
12 #include <sm/gen.h>
13 SM_IDSTR(id, "@(#)$Id: t-match.c,v 1.7 2000/12/18 18:12:12 ca Exp $")
14
15 #include <sm/string.h>
16 #include <sm/io.h>
17 #include <sm/test.h>
18
19 #define try(str, pat, want) \
20 got = sm_match(str, pat); \
21 if (!SM_TEST(got == want)) \
22 (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, \
23 "sm_match(\"%s\", \"%s\") returns %s\n", \
24 str, pat, got ? "true" : "false");
25
26 int
27 main(argc, argv)
28 int argc;
29 char **argv;
30 {
31 bool got;
32
33 sm_test_begin(argc, argv, "test sm_match");
|
1 /*
2 * Copyright (c) 2000 Proofpoint, Inc. and its suppliers.
3 * All rights reserved.
4 *
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 */
9
10 #include <sm/gen.h>
11 SM_IDSTR(id, "@(#)$Id: t-match.c,v 1.10 2013-11-22 20:51:43 ca Exp $")
12
13 #include <sm/string.h>
14 #include <sm/io.h>
15 #include <sm/test.h>
16
17 #define try(str, pat, want) \
18 got = sm_match(str, pat); \
19 if (!SM_TEST(got == want)) \
20 (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, \
21 "sm_match(\"%s\", \"%s\") returns %s\n", \
22 str, pat, got ? "true" : "false");
23
24 int
25 main(argc, argv)
26 int argc;
27 char **argv;
28 {
29 bool got;
30
31 sm_test_begin(argc, argv, "test sm_match");
|