Import sendmail 8.13.8
[dragonfly.git] / contrib / sendmail-8.13.8 / libsm / t-path.c
1 /*
2  * Copyright (c) 2000-2001 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 #include <sm/gen.h>
11 SM_IDSTR(id, "@(#)$Id: t-path.c,v 1.8 2001/09/11 04:04:49 gshapiro Exp $")
12
13 #include <string.h>
14 #include <sm/path.h>
15 #include <sm/test.h>
16
17 int
18 main(argc, argv)
19         int argc;
20         char **argv;
21 {
22         char *r;
23
24         sm_test_begin(argc, argv, "test path handling");
25
26         SM_TEST(sm_path_isdevnull(SM_PATH_DEVNULL));
27         r = "/dev/null";
28         SM_TEST(sm_path_isdevnull(r));
29         r = "/nev/dull";
30         SM_TEST(!sm_path_isdevnull(r));
31         r = "nul";
32         SM_TEST(!sm_path_isdevnull(r));
33
34         return sm_test_end();
35 }