2 * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
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.
10 #pragma ident "%Z%%M% %I% %E% SMI"
13 SM_IDSTR(id
, "@(#)$Id: t-fopen.c,v 1.9 2002/02/06 23:57:45 ca Exp $")
28 sm_test_begin(argc
, argv
, "test sm_io_fopen");
29 out
= sm_io_fopen("foo", O_WRONLY
|O_APPEND
|O_CREAT
, 0666);
33 (void) sm_io_fprintf(out
, SM_TIME_DEFAULT
, "foo\n");
34 r
= sm_io_getinfo(out
, SM_IO_WHAT_MODE
, &m
);
36 SM_TEST(m
== SM_IO_WRONLY
);
37 sm_io_close(out
, SM_TIME_DEFAULT
);