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 #pragma ident   "%Z%%M% %I%     %E% SMI"
  11 
  12 #include <sm/gen.h>
  13 SM_IDSTR(id, "@(#)$Id: t-path.c,v 1.6 2001/07/05 22:47:29 gshapiro Exp $")
  14 
  15 #include <string.h>
  16 #include <sm/path.h>
  17 #include <sm/test.h>
  18 
  19 int
  20 main(argc, argv)
  21         int argc;
  22         char **argv;
  23 {
  24         char *r;
  25 
  26         sm_test_begin(argc, argv, "test path handling");
  27 
  28         SM_TEST(sm_path_isdevnull(SM_PATH_DEVNULL));
  29         r = "/dev/null";
  30         SM_TEST(sm_path_isdevnull(r));
  31         r = "/nev/dull";
  32         SM_TEST(!sm_path_isdevnull(r));
  33         r = "nul";
  34         SM_TEST(!sm_path_isdevnull(r));
  35 
  36         return sm_test_end();
  37 }