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 (finally) been atf-ified



details:   https://anonhg.NetBSD.org/src/rev/3736746ad2b8
branches:  trunk
changeset: 763977:3736746ad2b8
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Sat Apr 09 17:55:51 2011 +0000

description:
These tests have (finally) been atf-ified

diffstat:

 regress/lib/libc/Makefile                                 |    4 +-
 regress/lib/libc/locale/Makefile                          |    5 -
 regress/lib/libc/locale/ctype1/Makefile                   |   24 -
 regress/lib/libc/locale/ctype1/ctype1.c                   |   83 --
 regress/lib/libc/locale/ctype1/en_US.UTF-8.exp.uue        |   13 -
 regress/lib/libc/locale/ctype1/en_US.UTF-8.in.uue         |    7 -
 regress/lib/libc/locale/ctype1/ja_JP.ISO-2022-JP.exp.uue  |   11 -
 regress/lib/libc/locale/ctype1/ja_JP.ISO-2022-JP.in.uue   |    6 -
 regress/lib/libc/locale/ctype1/ja_JP.SJIS.exp.uue         |   10 -
 regress/lib/libc/locale/ctype1/ja_JP.SJIS.in.uue          |    6 -
 regress/lib/libc/locale/ctype1/ja_JP.eucJP.exp.uue        |   10 -
 regress/lib/libc/locale/ctype1/ja_JP.eucJP.in.uue         |    6 -
 regress/lib/libc/locale/ctype2/C.in.uue                   |    6 -
 regress/lib/libc/locale/ctype2/Makefile                   |   25 -
 regress/lib/libc/locale/ctype2/en_US.UTF-8.in.uue         |    7 -
 regress/lib/libc/locale/ctype2/ja_JP.ISO-2022-JP-2.in.uue |    6 -
 regress/lib/libc/locale/ctype2/ja_JP.SJIS.in.uue          |    6 -
 regress/lib/libc/locale/ctype2/ja_JP.eucJP.in.uue         |    6 -
 regress/lib/libc/locale/ctype2/mbrtowc.c                  |  148 ----
 regress/lib/libc/locale/ctype3/Makefile                   |   27 -
 regress/lib/libc/locale/mbtowc/Makefile                   |   16 -
 regress/lib/libc/locale/mbtowc/en_US.UTF-8                |    2 -
 regress/lib/libc/locale/mbtowc/ja_JP.ISO-2022-JP          |    2 -
 regress/lib/libc/locale/mbtowc/ja_JP.SJIS                 |    2 -
 regress/lib/libc/locale/mbtowc/ja_JP.eucJP                |    2 -
 regress/lib/libc/locale/mbtowc/mbtowc_test.c              |   84 --
 regress/lib/libc/locale/mbtowc/zh_CN.GB18030              |    2 -
 regress/lib/libc/locale/mbtowc/zh_TW.Big5                 |    2 -
 regress/lib/libc/locale/mbtowc/zh_TW.eucTW                |    2 -
 regress/lib/libc/locale/wcstod/Makefile                   |   11 -
 regress/lib/libc/locale/wcstod/wcstod_test.c              |  417 --------------
 regress/lib/libc/locale/wctomb/Makefile                   |    5 -
 regress/lib/libc/locale/wctomb/Makefile.inc               |   13 -
 regress/lib/libc/locale/wctomb/iso2022-jp/Makefile        |    5 -
 regress/lib/libc/locale/wctomb/iso2022-jp/iso2022-jp.c    |   42 -
 regress/lib/libc/locale/wctomb/iso646/Makefile            |    5 -
 regress/lib/libc/locale/wctomb/iso646/iso646.c            |   36 -
 regress/lib/libc/locale/wctomb/test.c                     |   99 ---
 38 files changed, 2 insertions(+), 1161 deletions(-)

diffs (truncated from 1319 to 300 lines):

diff -r 035248a52e7f -r 3736746ad2b8 regress/lib/libc/Makefile
--- a/regress/lib/libc/Makefile Sat Apr 09 17:45:24 2011 +0000
+++ b/regress/lib/libc/Makefile Sat Apr 09 17:55:51 2011 +0000
@@ -1,6 +1,6 @@
-#      $NetBSD: Makefile,v 1.79 2011/01/11 16:34:27 pgoyette Exp $
+#      $NetBSD: Makefile,v 1.80 2011/04/09 17:55:51 pgoyette Exp $
 
-SUBDIR+= citrus divrem int_fmtio locale
+SUBDIR+= citrus divrem int_fmtio
 
 .include <bsd.own.mk>
 .include <bsd.sys.mk>
diff -r 035248a52e7f -r 3736746ad2b8 regress/lib/libc/locale/Makefile
--- a/regress/lib/libc/locale/Makefile  Sat Apr 09 17:45:24 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-#      $NetBSD: Makefile,v 1.4 2009/01/02 00:20:23 tnozaki Exp $
-
-SUBDIR+= ctype1 ctype2 ctype3 wcstod mbtowc wctomb
-
-.include <bsd.subdir.mk>
diff -r 035248a52e7f -r 3736746ad2b8 regress/lib/libc/locale/ctype1/Makefile
--- a/regress/lib/libc/locale/ctype1/Makefile   Sat Apr 09 17:45:24 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-#      $NetBSD: Makefile,v 1.4 2009/01/02 00:20:23 tnozaki Exp $
-
-NOMAN=         # defined
-
-PROG=          ctype1
-
-TESTS=         en_US.UTF-8 ja_JP.ISO-2022-JP ja_JP.SJIS ja_JP.eucJP
-
-INPUTS=                ${TESTS:S/$/.in/}
-EXPECTS=       ${TESTS:S/$/.exp/}
-OUTPUTS=       ${TESTS:S/$/.out/}
-
-UUDECODE_FILES=        ${INPUTS} ${EXPECTS}
-
-CLEANFILES+=   ${OUTPUTS} ${INPUTS} ${EXPECTS}
-
-regress: ${PROG} ${INPUTS} ${EXPECTS}
-.for L in ${TESTS}
-       @env LC_CTYPE=$L LC_ALL= LANG= ./${PROG} < $L.in > $L.out
-       @cmp $L.exp $L.out && echo "ok." 1>&2
-.endfor
-
-.include <bsd.files.mk>
-.include <bsd.prog.mk>
diff -r 035248a52e7f -r 3736746ad2b8 regress/lib/libc/locale/ctype1/ctype1.c
--- a/regress/lib/libc/locale/ctype1/ctype1.c   Sat Apr 09 17:45:24 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*     $NetBSD: ctype1.c,v 1.5 2006/05/10 19:07:22 mrg Exp $   */
-
-/*-
- * Copyright (c)2003 Citrus Project,
- * 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 AUTHOR 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 AUTHOR 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 <stdio.h>
-#include <stdlib.h>
-#include <err.h>
-#include <locale.h>
-#include <wchar.h>
-#include <string.h>
-
-int
-main(int ac, char **av)
-{
-       char    buf[256];
-       char    *str;
-       int     c;
-       wchar_t wbuf[256];
-       wchar_t *p;
-
-       str = setlocale(LC_ALL, "");
-       if (str == 0)
-               err(1, "setlocale");
-       fprintf(stderr, "===> Testing for locale %s... ", str);
-
-       for (str = buf; 1; str++) {
-               c = getchar();
-               if (c == EOF || c == '\n')
-                       break;
-               *str = c;
-       }
-       *str = '\0';
-       strcat(buf, "\n");
-
-       mbstowcs(wbuf, buf, sizeof(buf) / sizeof(buf[0]) - 1);
-       wcstombs(buf, wbuf, sizeof(wbuf) / sizeof(wbuf[0]) - 1);
-       printf("%s\n", buf);
-
-       /*
-        * The output here is implementation-dependent.
-        * When we replace the conversion routine, we might have to
-        * update the *.exp files.
-        */
-       for (p = wbuf; *p; p++) {
-               printf("0x%04X  ", (unsigned)*p);
-       }
-       putchar('\n');
-
-       printf("width:\n", buf);
-       for (p = wbuf; *p; p++) {
-               printf("%d ", wcwidth(*p));
-       }
-       putchar('\n');
-
-       printf("wcswidth=%d\n",
-           wcswidth(wbuf, sizeof(wbuf) / sizeof(wbuf[0]) - 1));
-
-       return 0;
-}
diff -r 035248a52e7f -r 3736746ad2b8 regress/lib/libc/locale/ctype1/en_US.UTF-8.exp.uue
--- a/regress/lib/libc/locale/ctype1/en_US.UTF-8.exp.uue        Sat Apr 09 17:45:24 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-#      $NetBSD: en_US.UTF-8.exp.uue,v 1.2 2009/01/02 00:20:24 tnozaki Exp $
-
-begin 664 en_US.UTF-8.exp
-M6P%_75O"@-^_75O@H(#OO[]=6_"0@(#WO[^_75OXB("`@/N_O[^_75O\A("`
-M@(#]O[^_O[]="@HP>#`P-4(@(#!X,#`P,2`@,'@P,#=&("`P>#`P-40@(#!X
-M,#`U0B`@,'@P,#@P("`P>#`W1D8@(#!X,#`U1"`@,'@P,#5"("`P>#`X,#`@
-M(#!X1D9&1B`@,'@P,#5$("`P>#`P-4(@(#!X,3`P,#`@(#!X,49&1D9&("`P
-M>#`P-40@(#!X,#`U0B`@,'@R,#`P,#`@(#!X,T9&1D9&1B`@,'@P,#5$("`P
-M>#`P-4(@(#!X-#`P,#`P,"`@,'@W1D9&1D9&1B`@,'@P,#5$("`P>#`P,$$@
-M(`IW:61T:#H*,2`M,2`M,2`Q(#$@+3$@+3$@,2`Q("TQ("TQ(#$@,2`M,2`M
-H,2`Q(#$@+3$@+3$@,2`Q("TQ("TQ(#$@+3$@"G=C<W=I9'1H/2TQ"B`M
-`
-end
diff -r 035248a52e7f -r 3736746ad2b8 regress/lib/libc/locale/ctype1/en_US.UTF-8.in.uue
--- a/regress/lib/libc/locale/ctype1/en_US.UTF-8.in.uue Sat Apr 09 17:45:24 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-#      $NetBSD: en_US.UTF-8.in.uue,v 1.1 2004/03/19 08:07:28 jmc Exp $
-
-begin 644 en_US.UTF-8.in
-M6P%_75O"@-^_75O@H(#OO[]=6_"0@(#WO[^_75OXB("`@/N_O[^_75O\A("`
-*@(#]O[^_O[]="EO@
-`
-end
diff -r 035248a52e7f -r 3736746ad2b8 regress/lib/libc/locale/ctype1/ja_JP.ISO-2022-JP.exp.uue
--- a/regress/lib/libc/locale/ctype1/ja_JP.ISO-2022-JP.exp.uue  Sat Apr 09 17:45:24 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-#      $NetBSD: ja_JP.ISO-2022-JP.exp.uue,v 1.1 2009/01/02 00:20:24 tnozaki Exp $
-
-begin 664 ja_JP.ISO-2022-JP.exp
-M&R1"(THC22-3)$<D.2$C&RA"86%A81LD0B0B)"0D)B0H)"H;*$(*"C!X-#(P
-M,#(S-$$@(#!X-#(P,#(S-#D@(#!X-#(P,#(S-3,@(#!X-#(P,#(T-#<@(#!X
-M-#(P,#(T,SD@(#!X-#(P,#(Q,C,@(#!X,#`V,2`@,'@P,#8Q("`P>#`P-C$@
-M(#!X,#`V,2`@,'@T,C`P,C0R,B`@,'@T,C`P,C0R-"`@,'@T,C`P,C0R-B`@
-M,'@T,C`P,C0R."`@,'@T,C`P,C0R02`@,'@P,#!!("`*=VED=&@Z"C(@,B`R
-I(#(@,B`R(#$@,2`Q(#$@,B`R(#(@,B`R("TQ(`IW8W-W:61T:#TM,0H@
-`
-end
diff -r 035248a52e7f -r 3736746ad2b8 regress/lib/libc/locale/ctype1/ja_JP.ISO-2022-JP.in.uue
--- a/regress/lib/libc/locale/ctype1/ja_JP.ISO-2022-JP.in.uue   Sat Apr 09 17:45:24 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-#      $NetBSD: ja_JP.ISO-2022-JP.in.uue,v 1.1 2009/01/02 00:20:24 tnozaki Exp $
-
-begin 644 ja_JP.ISO2022-JP.in
-G&R1"(THC22-3)$<D.2$C&RA"86%A81LD0B0B)"0D)B0H)"H;*$(*
-`
-end
diff -r 035248a52e7f -r 3736746ad2b8 regress/lib/libc/locale/ctype1/ja_JP.SJIS.exp.uue
--- a/regress/lib/libc/locale/ctype1/ja_JP.SJIS.exp.uue Sat Apr 09 17:45:24 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-#      $NetBSD: ja_JP.SJIS.exp.uue,v 1.2 2009/01/02 00:20:24 tnozaki Exp $
-
-begin 664 ja_JP.SJIS.exp
-M@G*":8)H@G*"Q8*W@4)A86%A@J""HH*D@J:"J`H*,'@X,C<R("`P>#@R-CD@
-M(#!X.#(V."`@,'@X,C<R("`P>#@R0S4@(#!X.#)"-R`@,'@X,30R("`P>#`P
-M-C$@(#!X,#`V,2`@,'@P,#8Q("`P>#`P-C$@(#!X.#)!,"`@,'@X,D$R("`P
-M>#@R030@(#!X.#)!-B`@,'@X,D$X("`P>#`P,$$@(`IW:61T:#H*,B`R(#(@
-J,B`R(#(@,B`Q(#$@,2`Q(#(@,B`R(#(@,B`M,2`*=V-S=VED=&@]+3$*
-`
-end
diff -r 035248a52e7f -r 3736746ad2b8 regress/lib/libc/locale/ctype1/ja_JP.SJIS.in.uue
--- a/regress/lib/libc/locale/ctype1/ja_JP.SJIS.in.uue  Sat Apr 09 17:45:24 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-#      $NetBSD: ja_JP.SJIS.in.uue,v 1.1 2004/03/19 08:07:28 jmc Exp $
-
-begin 644 ja_JP.SJIS.in
-=@G*":8)H@G*"Q8*W@4)A86%A@J""HH*D@J:"J`H`
-`
-end
diff -r 035248a52e7f -r 3736746ad2b8 regress/lib/libc/locale/ctype1/ja_JP.eucJP.exp.uue
--- a/regress/lib/libc/locale/ctype1/ja_JP.eucJP.exp.uue        Sat Apr 09 17:45:24 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-#      $NetBSD: ja_JP.eucJP.exp.uue,v 1.2 2009/01/02 00:20:24 tnozaki Exp $
-
-begin 664 ja_JP.eucJP.exp
-MH\6CU:/#I,>DN:&C86%A8:2BI*2DIJ2HI*H*"C!X03-#-2`@,'A!,T0U("`P
-M>$$S0S,@(#!X031#-R`@,'A!-$(Y("`P>$$Q03,@(#!X,#`V,2`@,'@P,#8Q
-M("`P>#`P-C$@(#!X,#`V,2`@,'A!-$$R("`P>$$T030@(#!X031!-B`@,'A!
-M-$$X("`P>$$T04$@(#!X,#`P02`@"G=I9'1H.@HR(#(@,B`R(#(@,B`Q(#$@
->,2`Q(#(@,B`R(#(@,B`M,2`*=V-S=VED=&@]+3$*
-`
-end
diff -r 035248a52e7f -r 3736746ad2b8 regress/lib/libc/locale/ctype1/ja_JP.eucJP.in.uue
--- a/regress/lib/libc/locale/ctype1/ja_JP.eucJP.in.uue Sat Apr 09 17:45:24 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-#      $NetBSD: ja_JP.eucJP.in.uue,v 1.1 2004/03/19 08:07:28 jmc Exp $
-
-begin 644 ja_JP.eucJP.in
-;H\6CU:/#I,>DN:&C86%A8:2BI*2DIJ2HI*H*
-`
-end
diff -r 035248a52e7f -r 3736746ad2b8 regress/lib/libc/locale/ctype2/C.in.uue
--- a/regress/lib/libc/locale/ctype2/C.in.uue   Sat Apr 09 17:45:24 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-#      $NetBSD: C.in.uue,v 1.1 2004/03/19 08:07:28 jmc Exp $
-
-begin 664 C.in
-,04)#1#`Q,C,T7UP*
-`
-end
diff -r 035248a52e7f -r 3736746ad2b8 regress/lib/libc/locale/ctype2/Makefile
--- a/regress/lib/libc/locale/ctype2/Makefile   Sat Apr 09 17:45:24 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-#      $NetBSD: Makefile,v 1.5 2009/01/02 00:20:24 tnozaki Exp $
-
-NOMAN=         # defined
-
-PROG=          mbrtowc
-
-TESTS=         C en_US.UTF-8 ja_JP.ISO-2022-JP-2 ja_JP.SJIS ja_JP.eucJP
-
-INPUTS=                ${TESTS:S/$/.in/}
-OUTPUTS=       ${TESTS:S/$/.out/}
-
-UUDECODE_FILES=        ${INPUTS}
-
-CLEANFILES+=   ${OUTPUTS} ${INPUTS}
-
-regress: ${PROG} ${TESTS}
-
-.PHONY:                ${TESTS}
-.for L in ${TESTS}
-$L: $L.in
-       @env LC_CTYPE=$L LC_ALL= LANG= ./${PROG} `cat ${.ALLSRC}` > $L.out
-.endfor
-
-.include <bsd.files.mk>
-.include <bsd.prog.mk>
diff -r 035248a52e7f -r 3736746ad2b8 regress/lib/libc/locale/ctype2/en_US.UTF-8.in.uue
--- a/regress/lib/libc/locale/ctype2/en_US.UTF-8.in.uue Sat Apr 09 17:45:24 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-#      $NetBSD: en_US.UTF-8.in.uue,v 1.1 2004/03/19 08:07:28 jmc Exp $
-
-begin 664 en_US.UTF-8.in
-M6P%_75O"@-^_75O@H(#OO[]=6_"0@(#WO[^_75OXB("`@/N_O[^_75O\A("`
-*@(#]O[^_O[]="EO@
-`
-end
diff -r 035248a52e7f -r 3736746ad2b8 regress/lib/libc/locale/ctype2/ja_JP.ISO-2022-JP-2.in.uue
--- a/regress/lib/libc/locale/ctype2/ja_JP.ISO-2022-JP-2.in.uue Sat Apr 09 17:45:24 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-#      $NetBSD: ja_JP.ISO-2022-JP-2.in.uue,v 1.1 2009/01/02 00:20:24 tnozaki Exp $
-
-begin 664 ja_JP.ISO2022-JP2.in
-?&R1"1GQ+7#AL&RA"01LD0B0B&RA"0ALD0B0D&RA""@!4
-`
-end
diff -r 035248a52e7f -r 3736746ad2b8 regress/lib/libc/locale/ctype2/ja_JP.SJIS.in.uue
--- a/regress/lib/libc/locale/ctype2/ja_JP.SJIS.in.uue  Sat Apr 09 17:45:24 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000



Home | Main Index | Thread Index | Old Index