summaryrefslogtreecommitdiff
path: root/tests/test-mbstowcs3.sh
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-03-31 00:30:39 +0200
committerBruno Haible <bruno@clisp.org>2023-03-31 00:30:39 +0200
commite5b2b726e2720cb6c13fde84afd1514aca9f03d6 (patch)
tree41599bcfe7af198dbf1182d5bd09c9bad71a2236 /tests/test-mbstowcs3.sh
parent7595a8817e03c1366817e69aa74263efa2ca4979 (diff)
downloadgnulib-e5b2b726e2720cb6c13fde84afd1514aca9f03d6.tar.gz
mbstowcs: Add tests.
* tests/test-mbstowcs1.sh: New file, based on tests/test-mbsrtowcs1.sh. * tests/test-mbstowcs2.sh: New file, based on tests/test-mbsrtowcs2.sh. * tests/test-mbstowcs3.sh: New file, based on tests/test-mbsrtowcs3.sh. * tests/test-mbstowcs4.sh: New file, based on tests/test-mbsrtowcs4.sh. * tests/test-mbstowcs5.sh: New file, based on tests/test-mbsrtowcs5.sh. * tests/test-mbstowcs.c: New file, based on tests/test-mbsrtowcs.c. * modules/mbstowcs-tests: New file, based on modules/mbsrtowcs-tests.
Diffstat (limited to 'tests/test-mbstowcs3.sh')
-rwxr-xr-xtests/test-mbstowcs3.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test-mbstowcs3.sh b/tests/test-mbstowcs3.sh
new file mode 100755
index 0000000000..ebaada5599
--- /dev/null
+++ b/tests/test-mbstowcs3.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-mbstowcs${EXEEXT} 3