xref: /onnv-gate/usr/src/cmd/sendmail/libsm/t-path.c (revision 0:68f95e015346)
1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
3*0Sstevel@tonic-gate  *	All rights reserved.
4*0Sstevel@tonic-gate  *
5*0Sstevel@tonic-gate  * By using this file, you agree to the terms and conditions set
6*0Sstevel@tonic-gate  * forth in the LICENSE file which can be found at the top level of
7*0Sstevel@tonic-gate  * the sendmail distribution.
8*0Sstevel@tonic-gate  */
9*0Sstevel@tonic-gate 
10*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
11*0Sstevel@tonic-gate 
12*0Sstevel@tonic-gate #include <sm/gen.h>
13*0Sstevel@tonic-gate SM_IDSTR(id, "@(#)$Id: t-path.c,v 1.6 2001/07/05 22:47:29 gshapiro Exp $")
14*0Sstevel@tonic-gate 
15*0Sstevel@tonic-gate #include <string.h>
16*0Sstevel@tonic-gate #include <sm/path.h>
17*0Sstevel@tonic-gate #include <sm/test.h>
18*0Sstevel@tonic-gate 
19*0Sstevel@tonic-gate int
20*0Sstevel@tonic-gate main(argc, argv)
21*0Sstevel@tonic-gate 	int argc;
22*0Sstevel@tonic-gate 	char **argv;
23*0Sstevel@tonic-gate {
24*0Sstevel@tonic-gate 	char *r;
25*0Sstevel@tonic-gate 
26*0Sstevel@tonic-gate 	sm_test_begin(argc, argv, "test path handling");
27*0Sstevel@tonic-gate 
28*0Sstevel@tonic-gate 	SM_TEST(sm_path_isdevnull(SM_PATH_DEVNULL));
29*0Sstevel@tonic-gate 	r = "/dev/null";
30*0Sstevel@tonic-gate 	SM_TEST(sm_path_isdevnull(r));
31*0Sstevel@tonic-gate 	r = "/nev/dull";
32*0Sstevel@tonic-gate 	SM_TEST(!sm_path_isdevnull(r));
33*0Sstevel@tonic-gate 	r = "nul";
34*0Sstevel@tonic-gate 	SM_TEST(!sm_path_isdevnull(r));
35*0Sstevel@tonic-gate 
36*0Sstevel@tonic-gate 	return sm_test_end();
37*0Sstevel@tonic-gate }
38