Revision 19204,
782 bytes
checked in by zacheiss, 22 years ago
(diff) |
This commit was generated by cvs2svn to compensate for changes in r19203,
which included commits to RCS files with non-trunk default branches.
|
Line | |
---|
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 | #include <sm/gen.h> |
---|
11 | SM_IDSTR(id, "@(#)$Id: t-strio.c,v 1.1.1.1 2003-04-08 15:06:05 zacheiss Exp $") |
---|
12 | #include <sm/string.h> |
---|
13 | #include <sm/io.h> |
---|
14 | #include <sm/test.h> |
---|
15 | |
---|
16 | int |
---|
17 | main(argc, argv) |
---|
18 | int argc; |
---|
19 | char *argv[]; |
---|
20 | { |
---|
21 | char buf[20]; |
---|
22 | char *r; |
---|
23 | SM_FILE_T f; |
---|
24 | |
---|
25 | sm_test_begin(argc, argv, "test strio"); |
---|
26 | (void) memset(buf, '.', 20); |
---|
27 | sm_strio_init(&f, buf, 10); |
---|
28 | (void) sm_io_fprintf(&f, SM_TIME_DEFAULT, "foobarbazoom"); |
---|
29 | sm_io_flush(&f, SM_TIME_DEFAULT); |
---|
30 | r = "foobarbaz"; |
---|
31 | SM_TEST(strcmp(buf, r) == 0); |
---|
32 | return sm_test_end(); |
---|
33 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.