Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/regress/lib/libc These tests have been converted to atf



details:   https://anonhg.NetBSD.org/src/rev/deb77471fa6f
branches:  trunk
changeset: 759943:deb77471fa6f
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Tue Dec 21 14:26:17 2010 +0000

description:
These tests have been converted to atf

diffstat:

 regress/lib/libc/Makefile              |   4 +-
 regress/lib/libc/stdio/Makefile        |   5 --
 regress/lib/libc/stdio/printf/Makefile |  11 ------
 regress/lib/libc/stdio/printf/printf.c |  22 ------------
 regress/lib/libc/stdio/scanf/Makefile  |  11 ------
 regress/lib/libc/stdio/scanf/scanf.c   |  62 ----------------------------------
 regress/lib/libc/stdio/sscanf/Makefile |  11 ------
 regress/lib/libc/stdio/sscanf/sscanf.c |  14 -------
 8 files changed, 2 insertions(+), 138 deletions(-)

diffs (179 lines):

diff -r aca1e7fdff24 -r deb77471fa6f regress/lib/libc/Makefile
--- a/regress/lib/libc/Makefile Tue Dec 21 14:23:42 2010 +0000
+++ b/regress/lib/libc/Makefile Tue Dec 21 14:26:17 2010 +0000
@@ -1,9 +1,9 @@
-#      $NetBSD: Makefile,v 1.58 2009/11/25 09:30:04 uebayasi Exp $
+#      $NetBSD: Makefile,v 1.59 2010/12/21 14:26:17 pgoyette Exp $
 
 SUBDIR+= _setjmp atexit basename citrus clone context convfp db dirname \
        div divrem gen gdtoa getaddrinfo hsearch inet int_fmtio locale md5sha \
        nsdispatch popen pty randomid regex rpc servent setjmp sigsetjmp \
-       stdio stdlib string strptime sys time
+       stdlib string strptime sys time
 
 .include <bsd.own.mk>
 .include <bsd.sys.mk>
diff -r aca1e7fdff24 -r deb77471fa6f regress/lib/libc/stdio/Makefile
--- a/regress/lib/libc/stdio/Makefile   Tue Dec 21 14:23:42 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-# $NetBSD: Makefile,v 1.3 2008/08/28 16:40:05 christos Exp $
-
-SUBDIR+= printf scanf sscanf
-
-.include <bsd.subdir.mk>
diff -r aca1e7fdff24 -r deb77471fa6f regress/lib/libc/stdio/printf/Makefile
--- a/regress/lib/libc/stdio/printf/Makefile    Tue Dec 21 14:23:42 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-#      $NetBSD: Makefile,v 1.1 2006/02/28 19:30:45 kleink Exp $
-
-NOMAN=         # defined
-
-PROG=          printf
-WARNS?=                4
-
-regress: ${PROG}
-       ./${PROG}
-
-.include <bsd.prog.mk>
diff -r aca1e7fdff24 -r deb77471fa6f regress/lib/libc/stdio/printf/printf.c
--- a/regress/lib/libc/stdio/printf/printf.c    Tue Dec 21 14:23:42 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-/* $NetBSD: printf.c,v 1.1 2006/02/28 19:30:45 kleink Exp $ */
-
-/*
- * Written by Klaus Klein <kleink%NetBSD.org@localhost>, February 28, 2006.
- * Public domain.
- */
-
-#include <assert.h>
-#include <stdio.h>
-
-int
-main(int argc, char *argv[])
-{
-       char s[2];
-
-       /* PR lib/32951: %.0f formats (0.0,0.5] to "0." */
-       assert(snprintf(s, sizeof(s), "%.0f", 0.1) == 1);
-       assert(s[0] == '0');
-       /* assert(s[1] == '\0'); */
-
-       return 0;
-}
diff -r aca1e7fdff24 -r deb77471fa6f regress/lib/libc/stdio/scanf/Makefile
--- a/regress/lib/libc/stdio/scanf/Makefile     Tue Dec 21 14:23:42 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-#      $NetBSD: Makefile,v 1.1 2003/05/30 12:46:05 simonb Exp $
-
-NOMAN=         # defined
-
-PROG=          scanf
-WARNS?=                1
-
-regress: ${PROG}
-       ./${PROG}
-
-.include <bsd.prog.mk>
diff -r aca1e7fdff24 -r deb77471fa6f regress/lib/libc/stdio/scanf/scanf.c
--- a/regress/lib/libc/stdio/scanf/scanf.c      Tue Dec 21 14:23:42 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/* $NetBSD: scanf.c,v 1.3 2008/04/28 20:23:05 martin Exp $ */
-
-/*-
- * Copyright (c) 2003 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-
-#include <assert.h>
-#include <err.h>
-#include <stdio.h>
-
-#define        NUM     -0x1234
-#define        STRNUM  ___STRING(NUM)
-
-int
-main(int argc, char **argv)
-{
-       int i;
-
-       /*
-        * NetBSD PR lib/21691:
-        * sscanf(3) %i format does not work properly with -ve hex numbers
-        */
-       sscanf(STRNUM, "%i", &i);
-       if (i != NUM)
-               errx(1, "want %d, got %d", NUM, i);
-       assert(i == NUM);
-
-       /*
-        * "%x" has the same problem as "%i" in lib/21691.
-        */
-       sscanf(STRNUM, "%x", &i);
-       if (i != NUM)
-               errx(1, "want %d, got %d", NUM, i);
-       assert(i == NUM);
-
-
-       return (0);
-}
diff -r aca1e7fdff24 -r deb77471fa6f regress/lib/libc/stdio/sscanf/Makefile
--- a/regress/lib/libc/stdio/sscanf/Makefile    Tue Dec 21 14:23:42 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-#      $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>
diff -r aca1e7fdff24 -r deb77471fa6f regress/lib/libc/stdio/sscanf/sscanf.c
--- a/regress/lib/libc/stdio/sscanf/sscanf.c    Tue Dec 21 14:23:42 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-#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;
-}



Home | Main Index | Thread Index | Old Index