]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid testsuite failures on SunOS4 and Solaris.
authorBruno Haible <bruno@clisp.org>
Tue, 18 Dec 2001 20:51:24 +0000 (20:51 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 21:50:51 +0000 (23:50 +0200)
tests/ChangeLog
tests/lang-clisp
tests/lang-librep
tests/lang-pascal
tests/lang-rst
tests/msgfilter-1
tests/msgfilter-2

index c103ce1df668d53e8e7909fc03101ea19b9599d6..3418a8197659bb0d0ce2a1ccfa0ab05744f437f3 100644 (file)
@@ -1,3 +1,12 @@
+2001-12-18  Bruno Haible  <bruno@clisp.org>
+
+       * msgfilter-1: Avoid failure on Solaris, due to broken 'fold' program.
+       * msgfilter-2: Avoid failure on Solaris, due to inferior 'sed' program.
+       * lang-clisp: Avoid spurious stderr output on SunOS4.
+       * lang-librep: Likewise.
+       * lang-pascal: Likewise.
+       * lang-rst: Likewise.
+
 2001-12-18  Bruno Haible  <bruno@clisp.org>
 
        * gettext-[12], msgcat-[1-7], msgcmp-[12], msgcomm-[1-9],
index be9578d56a0087f6769b867d1ca07f88717489e1..9463f7101bee1cf3a3fdcfb866591fe25337b9f0 100755 (executable)
@@ -92,7 +92,7 @@ EOF
 # Test for presence of clisp version 2.28 or newer.
 # Use clisp for the comparison of the version numbers; neither 'expr' nor 'bc'
 # can deal with floating-point numbers.
-clisp --version >/dev/null 2>/dev/null \
+(clisp --version) >/dev/null 2>/dev/null \
   || { echo "SKIP: lang-clisp"; rm -fr $tmpfiles; exit 77; }
 version=`clisp --version | sed -e 's/^[^0-9]*//'`
 case $version in
index 4b1c6fbb73fd9911070ac9ec4117bbd8fa4aff3f..0feacda3736332efa3c621cace12a6d22c5723ea 100755 (executable)
@@ -75,7 +75,7 @@ EUR remplace FF.
 EOF
 
 # Test for presence of rep.
-rep --version >/dev/null 2>/dev/null \
+(rep --version) >/dev/null 2>/dev/null \
   || { echo "SKIP: lang-librep"; rm -fr $tmpfiles; exit 77; }
 
 LANGUAGE= LC_ALL=fr_FR rep --no-rc --batch prog.jl > prog.out || exit 1
index 55934ee047c6c2389149730baef96f1d42fe8c2f..bae237a1204221ca3f73e82f3bafdeff3c3288a6 100755 (executable)
@@ -25,7 +25,7 @@ end.
 EOF
 
 tmpfiles="$tmpfiles prog.o prog.rst prog"
-ppc386 prog.pp >/dev/null 2>&1 || { echo "SKIP: lang-pascal"; rm -fr $tmpfiles; exit 77; }
+(ppc386 prog.pp) >/dev/null 2>&1 || { echo "SKIP: lang-pascal"; rm -fr $tmpfiles; exit 77; }
 
 tmpfiles="$tmpfiles prog.pot"
 : ${XGETTEXT=xgettext}
index 9359f6dca3fe85519a07e0a712a193c6d6fb77d6..4acbe502ca0a4cb0de96fc5e9798da011844fc1c 100755 (executable)
@@ -67,7 +67,7 @@ ${DIFF} prog.ok prog.pot || exit 1
 
 tmpfiles="$tmpfiles prog.pot"
 : ${RSTCONV=rstconv}
-if ${RSTCONV} -o prog.pot -i prog.rst >/dev/null 2>&1; then
+if (${RSTCONV} -o prog.pot -i prog.rst) >/dev/null 2>&1; then
 
 tmpfiles="$tmpfiles prog.ok"
 cat <<EOF > prog.ok
index bc633fb617977e9342ee86aa252278af6b683d8a..b61d25cfc31d7c2887f2e4c313ea860e7440c616 100755 (executable)
@@ -5,6 +5,9 @@
 tmpfiles=""
 trap 'rm -fr $tmpfiles' 1 2 3 15
 
+# Some fold programs (like SunOS4) don't have an option to wrap at spaces.
+echo abc | fold -b -s -w 20 >/dev/null 2>&1 || { echo "SKIP: msgfilter-1"; rm -fr $tmpfiles; exit 77; }
+
 tmpfiles="$tmpfiles mfi-test1.po"
 cat <<EOF > mfi-test1.po
 # HEADER.
index 0610675c403991364a4eced978769bab25a108a2..8d6e3d6591ef7697e0a1ff5417796b9706bb35b3 100755 (executable)
@@ -5,6 +5,24 @@
 tmpfiles=""
 trap 'rm -fr $tmpfiles' 1 2 3 15
 
+# Some sed programs (Solaris etc.) omit the last line if it ended without
+# a newline. We must skip this test when we encounter such a broken sed.
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    ac_n= ac_c='
+' ac_t='        '
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
+else
+  ac_n= ac_c='\c' ac_t=
+fi
+
+sedoutput=`echo $ac_n "abc$ac_c" | sed -e s/x/x/`
+test -n "$sedoutput" || { echo "SKIP: msgfilter-2"; rm -fr $tmpfiles; exit 77; }
+
 tmpfiles="$tmpfiles mfi-test2.po"
 cat <<EOF > mfi-test2.po
 # HEADER.