From: Bruno Haible Date: Mon, 7 Jan 2002 17:45:14 +0000 (+0000) Subject: Avoid a test failure on Irix and OSF/1. X-Git-Tag: v0.11~107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be5b827f950d23b08cea480b22283b351b466acf;p=thirdparty%2Fgettext.git Avoid a test failure on Irix and OSF/1. --- diff --git a/tests/ChangeLog b/tests/ChangeLog index 2056cf04b..b122aef18 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2002-01-05 Bruno Haible + + * msgfilter-2: Skip the test if 'sed' adds extraneous newlines. + 2002-01-04 Bruno Haible * msgcat-2: Avoid \" to " conversion in the here documents. diff --git a/tests/msgfilter-2 b/tests/msgfilter-2 index 38a480f68..91907680f 100755 --- a/tests/msgfilter-2 +++ b/tests/msgfilter-2 @@ -22,6 +22,12 @@ 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; } +# Some sed programs (IRIX, OSF/1 etc.) add a newline to the last line if it +# doesn't end with a newline. +sedoutputcount=`echo $ac_n "abc$ac_c" | sed -e s/x/x/ | wc -c` +sedoutputcount=`echo "$sedoutputcount" | sed -e 's/[ ]//g'` +test "$sedoutputcount" = 3 || { echo "SKIP: msgfilter-2"; rm -fr $tmpfiles; exit 77; } + tmpfiles="$tmpfiles mfi-test2.po" cat < mfi-test2.po # HEADER.