]> Savannah Git Hosting - gnulib.git/commitdiff
c32srtombs tests: Renumber tests.
authorBruno Haible <bruno@clisp.org>
Sat, 29 Jul 2023 20:35:24 +0000 (22:35 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 29 Jul 2023 23:40:36 +0000 (01:40 +0200)
* tests/test-c32srtombs-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
* tests/test-c32srtombs.c: Update.
* modules/c32srtombs-tests: Update.

ChangeLog
modules/c32srtombs-tests
tests/test-c32srtombs-1.sh [deleted file]
tests/test-c32srtombs-2.sh
tests/test-c32srtombs-3.sh
tests/test-c32srtombs-4.sh
tests/test-c32srtombs-5.sh [new file with mode: 0755]
tests/test-c32srtombs.c

index 086a5c24c63d63ee7622c9e2aa05bbf450cdf6c3..fe4a8d8b3f343c5639a399f529e4a965119da5ad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2023-07-29  Bruno Haible  <bruno@clisp.org>
 
+       c32srtombs tests: Renumber tests.
+       * tests/test-c32srtombs-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
+       * tests/test-c32srtombs.c: Update.
+       * modules/c32srtombs-tests: Update.
+
        c32snrtombs tests: Renumber tests.
        * tests/test-c32snrtombs-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
        * tests/test-c32snrtombs.c: Update.
index 3d6678e9344c21821c16cf26020a64274d136204..888d7324ace15e8fa48091f7faa36a3dd21d72b8 100644 (file)
@@ -1,8 +1,8 @@
 Files:
-tests/test-c32srtombs-1.sh
 tests/test-c32srtombs-2.sh
 tests/test-c32srtombs-3.sh
 tests/test-c32srtombs-4.sh
+tests/test-c32srtombs-5.sh
 tests/test-c32srtombs.c
 tests/signature.h
 tests/macros.h
@@ -22,7 +22,7 @@ gt_LOCALE_JA
 gt_LOCALE_ZH_CN
 
 Makefile.am:
-TESTS += test-c32srtombs-1.sh test-c32srtombs-2.sh test-c32srtombs-3.sh test-c32srtombs-4.sh
+TESTS += test-c32srtombs-2.sh test-c32srtombs-3.sh test-c32srtombs-4.sh test-c32srtombs-5.sh
 TESTS_ENVIRONMENT += \
   LOCALE_FR='@LOCALE_FR@' \
   LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
diff --git a/tests/test-c32srtombs-1.sh b/tests/test-c32srtombs-1.sh
deleted file mode 100755 (executable)
index faa3e40..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-c32srtombs${EXEEXT} 1
index 9a8bafed0f19e9c662a25d6c1b499d88e8bb9e62..1293167ad1b96f9c7b24e57d88795dc3346315c7 100755 (executable)
@@ -1,15 +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
+# 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 french Unicode locale is installed"
+    echo "Skipping test: no traditional french locale is installed"
   else
-    echo "Skipping test: no french Unicode locale is supported"
+    echo "Skipping test: no traditional french locale is supported"
   fi
   exit 77
 fi
 
-LC_ALL=$LOCALE_FR_UTF8 \
+LC_ALL=$LOCALE_FR \
 ${CHECKER} ./test-c32srtombs${EXEEXT} 2
index dc15550e476df65fcad54b5b437088ad4d6466f3..508a81faa3181c6c8b6e8f6a2bc802f68ede0a6a 100755 (executable)
@@ -1,15 +1,15 @@
 #!/bin/sh
 
-# Test whether a specific EUC-JP locale is installed.
-: "${LOCALE_JA=ja_JP}"
-if test $LOCALE_JA = none; then
+# 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 traditional japanese locale is installed"
+    echo "Skipping test: no french Unicode locale is installed"
   else
-    echo "Skipping test: no traditional japanese locale is supported"
+    echo "Skipping test: no french Unicode locale is supported"
   fi
   exit 77
 fi
 
-LC_ALL=$LOCALE_JA \
+LC_ALL=$LOCALE_FR_UTF8 \
 ${CHECKER} ./test-c32srtombs${EXEEXT} 3
index e83f13ef51ba61d7d044e7b0a11f2a2265e8062c..884668e0a5077fe63bbfdc826d693f2a0c94b192 100755 (executable)
@@ -1,15 +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
+# 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 transitional chinese locale is installed"
+    echo "Skipping test: no traditional japanese locale is installed"
   else
-    echo "Skipping test: no transitional chinese locale is supported"
+    echo "Skipping test: no traditional japanese locale is supported"
   fi
   exit 77
 fi
 
-LC_ALL=$LOCALE_ZH_CN \
+LC_ALL=$LOCALE_JA \
 ${CHECKER} ./test-c32srtombs${EXEEXT} 4
diff --git a/tests/test-c32srtombs-5.sh b/tests/test-c32srtombs-5.sh
new file mode 100755 (executable)
index 0000000..68d461b
--- /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-c32srtombs${EXEEXT} 5
index 3d5c67a77f9d7faae345d7299313f828462189e6..465c30d4c236ef6497bea878d1dc9da651792cd9 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[] = "s\303\274\303\237\360\237\230\213!"; /* "süß😋!" */
@@ -120,7 +120,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>"; /* "<日本語>" */
@@ -158,7 +158,7 @@ main (int argc, char *argv[])
           break;
 
 
-        case '4':
+        case '5':
           /* Locale encoding is GB18030.  */
           #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
           fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);