From: Bruno Haible Date: Tue, 18 Dec 2001 20:51:24 +0000 (+0000) Subject: Avoid testsuite failures on SunOS4 and Solaris. X-Git-Tag: v0.11~161 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9db35c3277037e5237db5847b039e4d4ddead013;p=thirdparty%2Fgettext.git Avoid testsuite failures on SunOS4 and Solaris. --- diff --git a/tests/ChangeLog b/tests/ChangeLog index c103ce1df..3418a8197 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,12 @@ +2001-12-18 Bruno Haible + + * 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 * gettext-[12], msgcat-[1-7], msgcmp-[12], msgcomm-[1-9], diff --git a/tests/lang-clisp b/tests/lang-clisp index be9578d56..9463f7101 100755 --- a/tests/lang-clisp +++ b/tests/lang-clisp @@ -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 diff --git a/tests/lang-librep b/tests/lang-librep index 4b1c6fbb7..0feacda37 100755 --- a/tests/lang-librep +++ b/tests/lang-librep @@ -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 diff --git a/tests/lang-pascal b/tests/lang-pascal index 55934ee04..bae237a12 100755 --- a/tests/lang-pascal +++ b/tests/lang-pascal @@ -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} diff --git a/tests/lang-rst b/tests/lang-rst index 9359f6dca..4acbe502c 100755 --- a/tests/lang-rst +++ b/tests/lang-rst @@ -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 < prog.ok diff --git a/tests/msgfilter-1 b/tests/msgfilter-1 index bc633fb61..b61d25cfc 100755 --- a/tests/msgfilter-1 +++ b/tests/msgfilter-1 @@ -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 < mfi-test1.po # HEADER. diff --git a/tests/msgfilter-2 b/tests/msgfilter-2 index 0610675c4..8d6e3d659 100755 --- a/tests/msgfilter-2 +++ b/tests/msgfilter-2 @@ -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 < mfi-test2.po # HEADER.