annotate tests/test-freading.c @ 14351:724011432f7b

Consistent macro naming for macros that use GCC __attribute__. * lib/di-set.h (_GL_ATTRIBUTE_NONNULL): Renamed from _ATTRIBUTE_NONNULL_. * lib/ino-map.h (_GL_ATTRIBUTE_NONNULL): Likewise. * lib/hash.h (_GL_ATTRIBUTE_WUR): Renamed from ATTRIBUTE_WUR. * lib/ignore-value.h (_GL_ATTRIBUTE_DEPRECATED): Renamed from ATTRIBUTE_DEPRECATED. * lib/openat.h (_GL_ATTRIBUTE_NORETURN): Renamed from ATTRIBUTE_NORETURN. * lib/sigpipe-die.h (_GL_ATTRIBUTE_NORETURN): Likewise. * lib/xmemdup0.h (_GL_ATTRIBUTE_NORETURN): Likewise. * lib/xstrtol.h (_GL_ATTRIBUTE_NORETURN): Likewise. * lib/xalloc.h (_GL_ATTRIBUTE_NORETURN): Likewise. (_GL_ATTRIBUTE_MALLOC): Renamed from ATTRIBUTE_MALLOC. (_GL_ATTRIBUTE_ALLOC_SIZE): Renamed from ATTRIBUTE_ALLOC_SIZE. * lib/version-etc.h (_GL_ATTRIBUTE_SENTINEL): Renamed from ATTRIBUTE_SENTINEL. * lib/safe-alloc.h (_GL_ATTRIBUTE_RETURN_CHECK): Renamed from ATTRIBUTE_RETURN_CHECK. * tests/test-ignore-value.c (_GL_ATTRIBUTE_RETURN_CHECK): Likewise. * tests/test-argmatch.c (_GL_ATTRIBUTE_NORETURN): Renamed from ATTRIBUTE_NORETURN. * tests/test-exclude.c (_GL_ATTRIBUTE_NORETURN): Likewise. Reported by Paul Eggert.
author Bruno Haible <bruno@clisp.org>
date Sun, 13 Feb 2011 23:44:28 +0100
parents 97fc9a21a8fb
children 8250f2777afc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
1 /* Test of freading() function.
14079
97fc9a21a8fb maint: update almost all copyright ranges to include 2011
Jim Meyering <meyering@redhat.com>
parents: 12724
diff changeset
2 Copyright (C) 2007-2011 Free Software Foundation, Inc.
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
3
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 8754
diff changeset
4 This program is free software: you can redistribute it and/or modify
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 8754
diff changeset
6 the Free Software Foundation; either version 3 of the License, or
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 8754
diff changeset
7 (at your option) any later version.
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
8
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
12 GNU General Public License for more details.
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
13
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 8754
diff changeset
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
16
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
17 /* Written by Bruno Haible <bruno@clisp.org>, 2007. */
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
18
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
19 #include <config.h>
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
20
12724
bc2866336bbb stdio: warn on suspicious uses
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
21 /* None of the files accessed by this test are large, so disable the
bc2866336bbb stdio: warn on suspicious uses
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
22 fseek link warning if we are not using the gnulib fseek module. */
bc2866336bbb stdio: warn on suspicious uses
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
23 #define _GL_NO_LARGE_FILES
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
24 #include "freading.h"
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
25
8754
1f57552cdb11 Better ASSERT macro.
Bruno Haible <bruno@clisp.org>
parents: 8753
diff changeset
26 #include <stdio.h>
12496
a48d3d749ca5 Refactor common macros used in tests.
Bruno Haible <bruno@clisp.org>
parents: 12297
diff changeset
27
a48d3d749ca5 Refactor common macros used in tests.
Bruno Haible <bruno@clisp.org>
parents: 12297
diff changeset
28 #include "macros.h"
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
29
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
30 #define TESTFILE "t-freading.tmp"
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
31
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
32 int
12197
e45d9bb2233e tests: avoid several compiler warnings
Eric Blake <ebb9@byu.net>
parents: 9889
diff changeset
33 main (void)
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
34 {
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
35 FILE *fp;
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
36
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
37 /* Create a file with some contents. Write-only file is never reading. */
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
38 fp = fopen (TESTFILE, "w");
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
39 ASSERT (fp);
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
40 ASSERT (!freading (fp));
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
41 ASSERT (fwrite ("foobarsh", 1, 8, fp) == 8);
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
42 ASSERT (!freading (fp));
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
43 ASSERT (fclose (fp) == 0);
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
44
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
45 /* Open it in read-only mode. Read-only file is always reading. */
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
46 fp = fopen (TESTFILE, "r");
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
47 ASSERT (fp);
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
48 ASSERT (freading (fp));
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
49 ASSERT (fgetc (fp) == 'f');
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
50 ASSERT (freading (fp));
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
51 ASSERT (fseek (fp, 2, SEEK_CUR) == 0);
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
52 ASSERT (freading (fp));
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
53 ASSERT (fgetc (fp) == 'b');
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
54 ASSERT (freading (fp));
8750
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
55 fflush (fp);
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
56 ASSERT (freading (fp));
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
57 ASSERT (fgetc (fp) == 'a');
8750
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
58 ASSERT (freading (fp));
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
59 ASSERT (fseek (fp, 0, SEEK_END) == 0);
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
60 ASSERT (freading (fp));
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
61 ASSERT (fclose (fp) == 0);
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
62
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
63 /* Open it in read-write mode. POSIX requires a reposition (fseek,
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
64 fsetpos, rewind) or EOF when transitioning from read to write;
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
65 freading is only deterministic after input or output, but this
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
66 test case should be portable even on open, after reposition, and
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
67 at EOF. */
8751
e66db74e11a7 Oops, fix details and comments of last patch.
Bruno Haible <bruno@clisp.org>
parents: 8750
diff changeset
68 /* First a scenario with only fgetc, fseek, fputc. */
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
69 fp = fopen (TESTFILE, "r+");
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
70 ASSERT (fp);
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
71 ASSERT (!freading (fp));
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
72 ASSERT (fgetc (fp) == 'f');
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
73 ASSERT (freading (fp));
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
74 ASSERT (fseek (fp, 2, SEEK_CUR) == 0);
8750
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
75 /* freading (fp) is undefined here, but fwriting (fp) is false. */
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
76 ASSERT (fgetc (fp) == 'b');
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
77 ASSERT (freading (fp));
8750
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
78 /* This fseek call is necessary when switching from reading to writing.
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
79 See the description of fopen(), ISO C 99 7.19.5.3.(6). */
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
80 ASSERT (fseek (fp, 0, SEEK_CUR) == 0);
8750
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
81 /* freading (fp) is undefined here, but fwriting (fp) is false. */
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
82 ASSERT (fputc ('x', fp) == 'x');
8750
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
83 ASSERT (!freading (fp));
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
84 ASSERT (fseek (fp, 0, SEEK_END) == 0);
8753
10d7922803f5 freading has an undefined value after repositioning a read-write stream.
Bruno Haible <bruno@clisp.org>
parents: 8751
diff changeset
85 /* freading (fp) is undefined here, because on some implementations (e.g.
10d7922803f5 freading has an undefined value after repositioning a read-write stream.
Bruno Haible <bruno@clisp.org>
parents: 8751
diff changeset
86 glibc) fseek causes a buffer to be read.
10d7922803f5 freading has an undefined value after repositioning a read-write stream.
Bruno Haible <bruno@clisp.org>
parents: 8751
diff changeset
87 fwriting (fp) is undefined as well. */
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
88 ASSERT (fclose (fp) == 0);
8750
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
89
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
90 /* Open it in read-write mode. POSIX requires a reposition (fseek,
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
91 fsetpos, rewind) or EOF when transitioning from read to write;
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
92 freading is only deterministic after input or output, but this
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
93 test case should be portable even on open, after reposition, and
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
94 at EOF. */
8751
e66db74e11a7 Oops, fix details and comments of last patch.
Bruno Haible <bruno@clisp.org>
parents: 8750
diff changeset
95 /* Here a scenario that includes fflush. */
8750
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
96 fp = fopen (TESTFILE, "r+");
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
97 ASSERT (fp);
8750
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
98 ASSERT (!freading (fp));
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
99 ASSERT (fgetc (fp) == 'f');
8750
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
100 ASSERT (freading (fp));
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
101 ASSERT (fseek (fp, 2, SEEK_CUR) == 0);
8750
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
102 /* freading (fp) is undefined here, but fwriting (fp) is false. */
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
103 ASSERT (fgetc (fp) == 'b');
8750
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
104 ASSERT (freading (fp));
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
105 fflush (fp);
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
106 /* freading (fp) is undefined here, but fwriting (fp) is false. */
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
107 ASSERT (fgetc (fp) == 'x');
8750
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
108 ASSERT (freading (fp));
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
109 /* This fseek call is necessary when switching from reading to writing.
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
110 See the description of fopen(), ISO C 99 7.19.5.3.(6). */
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
111 ASSERT (fseek (fp, 0, SEEK_CUR) == 0);
8750
67a7b3fd6cf2 Make the tests sharper: also test the interaction with fflush().
Bruno Haible <bruno@clisp.org>
parents: 8720
diff changeset
112 /* freading (fp) is undefined here, but fwriting (fp) is false. */
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
113 ASSERT (fputc ('z', fp) == 'z');
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
114 ASSERT (!freading (fp));
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
115 ASSERT (fseek (fp, 0, SEEK_END) == 0);
8753
10d7922803f5 freading has an undefined value after repositioning a read-write stream.
Bruno Haible <bruno@clisp.org>
parents: 8751
diff changeset
116 /* freading (fp) is undefined here, because on some implementations (e.g.
10d7922803f5 freading has an undefined value after repositioning a read-write stream.
Bruno Haible <bruno@clisp.org>
parents: 8751
diff changeset
117 glibc) fseek causes a buffer to be read.
10d7922803f5 freading has an undefined value after repositioning a read-write stream.
Bruno Haible <bruno@clisp.org>
parents: 8751
diff changeset
118 fwriting (fp) is undefined as well. */
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
119 ASSERT (fclose (fp) == 0);
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
120
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
121 /* Open it in append mode. Write-only file is never reading. */
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
122 fp = fopen (TESTFILE, "a");
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
123 ASSERT (fp);
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
124 ASSERT (!freading (fp));
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
125 ASSERT (fwrite ("bla", 1, 3, fp) == 3);
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
126 ASSERT (!freading (fp));
12297
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
127 ASSERT (fclose (fp) == 0);
77743721a2f3 test-freading: clean up temporary file
Eric Blake <ebb9@byu.net>
parents: 12255
diff changeset
128 ASSERT (remove (TESTFILE) == 0);
8720
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
129 return 0;
367787d55c9c Implement freading and fwriting.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
130 }