]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix a test failure on Solaris.
authorBruno Haible <bruno@clisp.org>
Sun, 30 Aug 2009 23:15:19 +0000 (01:15 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 30 Aug 2009 23:15:19 +0000 (01:15 +0200)
gettext-tools/tests/ChangeLog
gettext-tools/tests/msgexec-2

index f96b1f573ebeb5e79cabfd8bea073dc3bc6c3c06..b8507d6aad390be5653bac0918ab56eff687be9e 100644 (file)
@@ -1,3 +1,8 @@
+2009-08-30  Bruno Haible  <bruno@clisp.org>
+
+       Fix a test failure on Solaris.
+       * msgexec-2 (TR): New variable.
+
 2009-08-15  Bruno Haible  <bruno@clisp.org>
 
        * msgunfmt-tcl-1: Explain that this test fails on mingw.
index 9191d05984fe0a33f0f02f72d798143eff549323..94d61e9dbf4b23a83ee472dce5cc56e9faf2f603 100755 (executable)
@@ -5,6 +5,18 @@
 tmpfiles=""
 trap 'rm -fr $tmpfiles' 1 2 3 15
 
+# Find a 'tr' program that supports NUL bytes in the input.
+# Solaris /usr/bin/tr does not.
+if test -f /usr/xpg6/bin/tr; then
+  TR=/usr/xpg6/bin/tr
+else
+  if test -f /usr/xpg4/bin/tr; then
+    TR=/usr/xpg4/bin/tr
+  else
+    TR=tr
+  fi
+fi
+
 tmpfiles="$tmpfiles mex-test2.po"
 cat <<\EOF > mex-test2.po
 # HEADER.
@@ -64,7 +76,7 @@ ${MSGEXEC} -i mex-test2.po 0 > mex-test2.tmp 2> mex-test2.err
 result=$?
 cat mex-test2.err | grep -v 'warning: Locale charset' | grep -v '^ '
 test $result = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < mex-test2.tmp > mex-test2.out
+LC_ALL=C $TR -d '\r' < mex-test2.tmp > mex-test2.out
 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
 
 : ${CMP=cmp}