diff options
author | stevel@tonic-gate <none@none> | 2005-06-14 00:00:00 -0700 |
---|---|---|
committer | stevel@tonic-gate <none@none> | 2005-06-14 00:00:00 -0700 |
commit | 7c478bd95313f5f23a4c958a745db2134aa03244 (patch) | |
tree | c871e58545497667cbb4b0a4f2daf204743e1fe7 /usr/src/cmd/sendmail/libsm/t-path.c | |
download | illumos-joyent-7c478bd95313f5f23a4c958a745db2134aa03244.tar.gz |
OpenSolaris Launch
Diffstat (limited to 'usr/src/cmd/sendmail/libsm/t-path.c')
-rw-r--r-- | usr/src/cmd/sendmail/libsm/t-path.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/usr/src/cmd/sendmail/libsm/t-path.c b/usr/src/cmd/sendmail/libsm/t-path.c new file mode 100644 index 0000000000..066d2bbaa4 --- /dev/null +++ b/usr/src/cmd/sendmail/libsm/t-path.c @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the sendmail distribution. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include <sm/gen.h> +SM_IDSTR(id, "@(#)$Id: t-path.c,v 1.6 2001/07/05 22:47:29 gshapiro Exp $") + +#include <string.h> +#include <sm/path.h> +#include <sm/test.h> + +int +main(argc, argv) + int argc; + char **argv; +{ + char *r; + + sm_test_begin(argc, argv, "test path handling"); + + SM_TEST(sm_path_isdevnull(SM_PATH_DEVNULL)); + r = "/dev/null"; + SM_TEST(sm_path_isdevnull(r)); + r = "/nev/dull"; + SM_TEST(!sm_path_isdevnull(r)); + r = "nul"; + SM_TEST(!sm_path_isdevnull(r)); + + return sm_test_end(); +} |