Deleted Added
full compact
getdelim_test.c (291840) getdelim_test.c (291870)
1/*-
2 * Copyright (c) 2009 David Schultz <das@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2009 David Schultz <das@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: stable/10/lib/libc/tests/stdio/getdelim_test.c 291840 2015-12-05 04:17:40Z ngie $");
28__FBSDID("$FreeBSD: stable/10/lib/libc/tests/stdio/getdelim_test.c 291870 2015-12-05 21:49:35Z ngie $");
29
30#define _WITH_GETLINE
31#include <errno.h>
32#include <stdio.h>
33#include <stdlib.h>
34#include <string.h>
35
36#include <atf-c.h>

--- 71 unchanged lines hidden (view full) ---

108 fclose(fp);
109 }
110 ATF_REQUIRE(errno == 0);
111}
112
113ATF_TC_WITHOUT_HEAD(stream_error);
114ATF_TC_BODY(stream_error, tc)
115{
29
30#define _WITH_GETLINE
31#include <errno.h>
32#include <stdio.h>
33#include <stdlib.h>
34#include <string.h>
35
36#include <atf-c.h>

--- 71 unchanged lines hidden (view full) ---

108 fclose(fp);
109 }
110 ATF_REQUIRE(errno == 0);
111}
112
113ATF_TC_WITHOUT_HEAD(stream_error);
114ATF_TC_BODY(stream_error, tc)
115{
116 FILE *fp;
117 char *line;
118 size_t linecap;
119
120 /* Make sure read errors are handled properly. */
121 line = NULL;
122 linecap = 0;
123 errno = 0;
124 ATF_REQUIRE(getline(&line, &linecap, stdout) == -1);

--- 115 unchanged lines hidden ---
116 char *line;
117 size_t linecap;
118
119 /* Make sure read errors are handled properly. */
120 line = NULL;
121 linecap = 0;
122 errno = 0;
123 ATF_REQUIRE(getline(&line, &linecap, stdout) == -1);

--- 115 unchanged lines hidden ---