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