xref: /freebsd/contrib/sendmail/libsm/t-path.c (revision 7d8f797b725e3efc0a4256554654780df83c456c)
1 /*
2  * Copyright (c) 2000-2001 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-path.c,v 1.9 2013-11-22 20:51:43 ca 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 }
36