]> Savannah Git Hosting - gnulib.git/commitdiff
wcsrtombs tests: Renumber tests.
authorBruno Haible <bruno@clisp.org>
Sat, 29 Jul 2023 22:56:31 +0000 (00:56 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 29 Jul 2023 23:41:49 +0000 (01:41 +0200)
* tests/test-wcsrtombs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
* tests/test-wcsrtombs.c: Update.
* modules/wcsrtombs-tests: Update.

ChangeLog
modules/wcsrtombs-tests
tests/test-wcsrtombs-2.sh [new file with mode: 0755]
tests/test-wcsrtombs-3.sh [new file with mode: 0755]
tests/test-wcsrtombs-4.sh [new file with mode: 0755]
tests/test-wcsrtombs-5.sh [new file with mode: 0755]
tests/test-wcsrtombs.c
tests/test-wcsrtombs1.sh [deleted file]
tests/test-wcsrtombs2.sh [deleted file]
tests/test-wcsrtombs3.sh [deleted file]
tests/test-wcsrtombs4.sh [deleted file]

index 20c46a6d1817501f5e440436f5ce160280016978..53e22f3c989d3ed2aa0b2c5d5509a633b0ccbf3e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2023-07-29  Bruno Haible  <bruno@clisp.org>
 
+       wcsrtombs tests: Renumber tests.
+       * tests/test-wcsrtombs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
+       * tests/test-wcsrtombs.c: Update.
+       * modules/wcsrtombs-tests: Update.
+
        wcsnrtombs tests: Renumber tests.
        * tests/test-wcsnrtombs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
        * tests/test-wcsnrtombs.c: Update.
index 09b12d7ef3e489d388d12d0840555fdc8bc13803..b042a52973caaeadfe6bd52d868cc0aa4245783e 100644 (file)
@@ -1,8 +1,8 @@
 Files:
-tests/test-wcsrtombs1.sh
-tests/test-wcsrtombs2.sh
-tests/test-wcsrtombs3.sh
-tests/test-wcsrtombs4.sh
+tests/test-wcsrtombs-2.sh
+tests/test-wcsrtombs-3.sh
+tests/test-wcsrtombs-4.sh
+tests/test-wcsrtombs-5.sh
 tests/test-wcsrtombs.c
 tests/signature.h
 tests/macros.h
@@ -21,7 +21,9 @@ gt_LOCALE_JA
 gt_LOCALE_ZH_CN
 
 Makefile.am:
-TESTS += test-wcsrtombs1.sh test-wcsrtombs2.sh test-wcsrtombs3.sh test-wcsrtombs4.sh
+TESTS += \
+  test-wcsrtombs-2.sh test-wcsrtombs-3.sh test-wcsrtombs-4.sh \
+  test-wcsrtombs-5.sh
 TESTS_ENVIRONMENT += \
   LOCALE_FR='@LOCALE_FR@' \
   LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
diff --git a/tests/test-wcsrtombs-2.sh b/tests/test-wcsrtombs-2.sh
new file mode 100755 (executable)
index 0000000..7a16db5
--- /dev/null
@@ -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-wcsrtombs${EXEEXT} 2
diff --git a/tests/test-wcsrtombs-3.sh b/tests/test-wcsrtombs-3.sh
new file mode 100755 (executable)
index 0000000..477a6b7
--- /dev/null
@@ -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-wcsrtombs${EXEEXT} 3
diff --git a/tests/test-wcsrtombs-4.sh b/tests/test-wcsrtombs-4.sh
new file mode 100755 (executable)
index 0000000..7382fb5
--- /dev/null
@@ -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-wcsrtombs${EXEEXT} 4
diff --git a/tests/test-wcsrtombs-5.sh b/tests/test-wcsrtombs-5.sh
new file mode 100755 (executable)
index 0000000..572a51d
--- /dev/null
@@ -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-wcsrtombs${EXEEXT} 5
index e75dfa6cc731dd5d62d2d6a978b057b19a1377f6..4b9d5684706f8e418217c153568d23357f63661a 100644 (file)
@@ -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-wcsrtombs1.sh b/tests/test-wcsrtombs1.sh
deleted file mode 100755 (executable)
index 47ce323..0000000
+++ /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-wcsrtombs${EXEEXT} 1
diff --git a/tests/test-wcsrtombs2.sh b/tests/test-wcsrtombs2.sh
deleted file mode 100755 (executable)
index e347c89..0000000
+++ /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-wcsrtombs${EXEEXT} 2
diff --git a/tests/test-wcsrtombs3.sh b/tests/test-wcsrtombs3.sh
deleted file mode 100755 (executable)
index 217be4b..0000000
+++ /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-wcsrtombs${EXEEXT} 3
diff --git a/tests/test-wcsrtombs4.sh b/tests/test-wcsrtombs4.sh
deleted file mode 100755 (executable)
index d8e0ede..0000000
+++ /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-wcsrtombs${EXEEXT} 4