From: Bruno Haible Date: Sat, 29 Jul 2023 22:52:24 +0000 (+0200) Subject: wcsnrtombs tests: Renumber tests. X-Git-Tag: v1.0~993 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=81fc28cd958eaf6452867bad4125be77102ed880;p=gnulib.git wcsnrtombs tests: Renumber tests. * tests/test-wcsnrtombs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5. * tests/test-wcsnrtombs.c: Update. * modules/wcsnrtombs-tests: Update. --- diff --git a/ChangeLog b/ChangeLog index 4a26a99194..20c46a6d18 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2023-07-29 Bruno Haible + wcsnrtombs tests: Renumber tests. + * tests/test-wcsnrtombs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5. + * tests/test-wcsnrtombs.c: Update. + * modules/wcsnrtombs-tests: Update. + wcrtomb tests: Renumber tests. * tests/test-wcrtomb.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1. * tests/test-wcrtomb.c: Update. diff --git a/modules/wcsnrtombs-tests b/modules/wcsnrtombs-tests index 6ddd43a27e..04ec77eff6 100644 --- a/modules/wcsnrtombs-tests +++ b/modules/wcsnrtombs-tests @@ -1,8 +1,8 @@ Files: -tests/test-wcsnrtombs1.sh -tests/test-wcsnrtombs2.sh -tests/test-wcsnrtombs3.sh -tests/test-wcsnrtombs4.sh +tests/test-wcsnrtombs-2.sh +tests/test-wcsnrtombs-3.sh +tests/test-wcsnrtombs-4.sh +tests/test-wcsnrtombs-5.sh tests/test-wcsnrtombs.c tests/signature.h tests/macros.h @@ -21,7 +21,9 @@ gt_LOCALE_JA gt_LOCALE_ZH_CN Makefile.am: -TESTS += test-wcsnrtombs1.sh test-wcsnrtombs2.sh test-wcsnrtombs3.sh test-wcsnrtombs4.sh +TESTS += \ + test-wcsnrtombs-2.sh test-wcsnrtombs-3.sh test-wcsnrtombs-4.sh \ + test-wcsnrtombs-5.sh TESTS_ENVIRONMENT += \ LOCALE_FR='@LOCALE_FR@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ diff --git a/tests/test-wcsnrtombs-2.sh b/tests/test-wcsnrtombs-2.sh new file mode 100755 index 0000000000..ec4e27d86d --- /dev/null +++ b/tests/test-wcsnrtombs-2.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Test in an ISO-8859-1 or ISO-8859-15 locale. +: "${LOCALE_FR=fr_FR}" +if test $LOCALE_FR = none; then + if test -f /usr/bin/localedef; then + echo "Skipping test: no traditional french locale is installed" + else + echo "Skipping test: no traditional french locale is supported" + fi + exit 77 +fi + +LC_ALL=$LOCALE_FR \ +${CHECKER} ./test-wcsnrtombs${EXEEXT} 2 diff --git a/tests/test-wcsnrtombs-3.sh b/tests/test-wcsnrtombs-3.sh new file mode 100755 index 0000000000..414a43ec89 --- /dev/null +++ b/tests/test-wcsnrtombs-3.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Test whether a specific UTF-8 locale is installed. +: "${LOCALE_FR_UTF8=fr_FR.UTF-8}" +if test $LOCALE_FR_UTF8 = none; then + if test -f /usr/bin/localedef; then + echo "Skipping test: no french Unicode locale is installed" + else + echo "Skipping test: no french Unicode locale is supported" + fi + exit 77 +fi + +LC_ALL=$LOCALE_FR_UTF8 \ +${CHECKER} ./test-wcsnrtombs${EXEEXT} 3 diff --git a/tests/test-wcsnrtombs-4.sh b/tests/test-wcsnrtombs-4.sh new file mode 100755 index 0000000000..a0277b4cee --- /dev/null +++ b/tests/test-wcsnrtombs-4.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Test whether a specific EUC-JP locale is installed. +: "${LOCALE_JA=ja_JP}" +if test $LOCALE_JA = none; then + if test -f /usr/bin/localedef; then + echo "Skipping test: no traditional japanese locale is installed" + else + echo "Skipping test: no traditional japanese locale is supported" + fi + exit 77 +fi + +LC_ALL=$LOCALE_JA \ +${CHECKER} ./test-wcsnrtombs${EXEEXT} 4 diff --git a/tests/test-wcsnrtombs-5.sh b/tests/test-wcsnrtombs-5.sh new file mode 100755 index 0000000000..da76f687a7 --- /dev/null +++ b/tests/test-wcsnrtombs-5.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Test whether a specific GB18030 locale is installed. +: "${LOCALE_ZH_CN=zh_CN.GB18030}" +if test $LOCALE_ZH_CN = none; then + if test -f /usr/bin/localedef; then + echo "Skipping test: no transitional chinese locale is installed" + else + echo "Skipping test: no transitional chinese locale is supported" + fi + exit 77 +fi + +LC_ALL=$LOCALE_ZH_CN \ +${CHECKER} ./test-wcsnrtombs${EXEEXT} 5 diff --git a/tests/test-wcsnrtombs.c b/tests/test-wcsnrtombs.c index 440d7c5edd..d9d9178c33 100644 --- a/tests/test-wcsnrtombs.c +++ b/tests/test-wcsnrtombs.c @@ -54,7 +54,7 @@ main (int argc, char *argv[]) switch (argv[1][0]) { - case '1': + case '2': /* Locale encoding is ISO-8859-1 or ISO-8859-15. */ { const char original[] = "B\374\337er"; /* "Büßer" */ @@ -83,7 +83,7 @@ main (int argc, char *argv[]) } break; - case '2': + case '3': /* Locale encoding is UTF-8. */ { const char original[] = "B\303\274\303\237er"; /* "Büßer" */ @@ -118,7 +118,7 @@ main (int argc, char *argv[]) } break; - case '3': + case '4': /* Locale encoding is EUC-JP. */ { const char original[] = "<\306\374\313\334\270\354>"; /* "<日本語>" */ @@ -156,7 +156,7 @@ main (int argc, char *argv[]) break; - case '4': + case '5': /* Locale encoding is GB18030. */ { const char original[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ diff --git a/tests/test-wcsnrtombs1.sh b/tests/test-wcsnrtombs1.sh deleted file mode 100755 index 0468a68221..0000000000 --- a/tests/test-wcsnrtombs1.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Test in an ISO-8859-1 or ISO-8859-15 locale. -: "${LOCALE_FR=fr_FR}" -if test $LOCALE_FR = none; then - if test -f /usr/bin/localedef; then - echo "Skipping test: no traditional french locale is installed" - else - echo "Skipping test: no traditional french locale is supported" - fi - exit 77 -fi - -LC_ALL=$LOCALE_FR \ -${CHECKER} ./test-wcsnrtombs${EXEEXT} 1 diff --git a/tests/test-wcsnrtombs2.sh b/tests/test-wcsnrtombs2.sh deleted file mode 100755 index 2066794398..0000000000 --- a/tests/test-wcsnrtombs2.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Test whether a specific UTF-8 locale is installed. -: "${LOCALE_FR_UTF8=fr_FR.UTF-8}" -if test $LOCALE_FR_UTF8 = none; then - if test -f /usr/bin/localedef; then - echo "Skipping test: no french Unicode locale is installed" - else - echo "Skipping test: no french Unicode locale is supported" - fi - exit 77 -fi - -LC_ALL=$LOCALE_FR_UTF8 \ -${CHECKER} ./test-wcsnrtombs${EXEEXT} 2 diff --git a/tests/test-wcsnrtombs3.sh b/tests/test-wcsnrtombs3.sh deleted file mode 100755 index 1b67da7fb5..0000000000 --- a/tests/test-wcsnrtombs3.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Test whether a specific EUC-JP locale is installed. -: "${LOCALE_JA=ja_JP}" -if test $LOCALE_JA = none; then - if test -f /usr/bin/localedef; then - echo "Skipping test: no traditional japanese locale is installed" - else - echo "Skipping test: no traditional japanese locale is supported" - fi - exit 77 -fi - -LC_ALL=$LOCALE_JA \ -${CHECKER} ./test-wcsnrtombs${EXEEXT} 3 diff --git a/tests/test-wcsnrtombs4.sh b/tests/test-wcsnrtombs4.sh deleted file mode 100755 index c7759505ac..0000000000 --- a/tests/test-wcsnrtombs4.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Test whether a specific GB18030 locale is installed. -: "${LOCALE_ZH_CN=zh_CN.GB18030}" -if test $LOCALE_ZH_CN = none; then - if test -f /usr/bin/localedef; then - echo "Skipping test: no transitional chinese locale is installed" - else - echo "Skipping test: no transitional chinese locale is supported" - fi - exit 77 -fi - -LC_ALL=$LOCALE_ZH_CN \ -${CHECKER} ./test-wcsnrtombs${EXEEXT} 4