summaryrefslogtreecommitdiff
path: root/tests/init.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'tests/init.cfg')
-rw-r--r--tests/init.cfg9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/init.cfg b/tests/init.cfg
index 75a94941..e7a23893 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -162,3 +162,12 @@ hex_printf_()
printf $(printf '\\%o' \
$(printf %s "$1"|sed 's,\\x\([0-9a-fA-F][0-9a-fA-F]\), 0x\1,g'))
}
+
+# Wrap tr so that it always runs in the C locale.
+# Otherwise, in a multibyte locale, GNU tr (which is not multibyte-aware
+# as of 2014-11-08), would work differently than others. For example,
+# this command, which was written with unibyte GNU tr in mind,
+# LC_ALL=ja_JP.eucJP tr AB '\244\263'
+# would act like this with the multibyte tr from HP-UX and Solaris:
+# LC_ALL=ja_JP.eucJP tr A '\244\263'
+tr() { LC_ALL=C env -- tr "$@"; }