whitespace regression test from Andy Shevchenko
This commit is contained in:
parent
00c798e9e3
commit
688adf3edf
@ -1,5 +1,5 @@
|
||||
# $NetBSD: Makefile,v 1.2 2006/02/28 19:30:45 kleink Exp $
|
||||
# $NetBSD: Makefile,v 1.3 2008/08/28 16:40:05 christos Exp $
|
||||
|
||||
SUBDIR+= printf scanf
|
||||
SUBDIR+= printf scanf sscanf
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
|
11
regress/lib/libc/stdio/sscanf/Makefile
Normal file
11
regress/lib/libc/stdio/sscanf/Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
# $NetBSD: Makefile,v 1.1 2008/08/28 16:40:05 christos Exp $
|
||||
|
||||
NOMAN= # defined
|
||||
|
||||
PROG= sscanf
|
||||
WARNS?= 1
|
||||
|
||||
regress: ${PROG}
|
||||
./${PROG}
|
||||
|
||||
.include <bsd.prog.mk>
|
14
regress/lib/libc/stdio/sscanf/sscanf.c
Normal file
14
regress/lib/libc/stdio/sscanf/sscanf.c
Normal file
@ -0,0 +1,14 @@
|
||||
#include <stdio.h>
|
||||
#include <err.h>
|
||||
|
||||
static const char str[] = "\f\n\r\t\v%z";
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
/* set of "white space" symbols from isspace(3) */
|
||||
char c = 0;
|
||||
(void)sscanf(str, "%%%c", &c);
|
||||
if (c != 'z')
|
||||
errx(1, "expected `%c', got `%c'", 'z', c);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user