]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid a test failure on Irix and OSF/1.
authorBruno Haible <bruno@clisp.org>
Mon, 7 Jan 2002 17:45:14 +0000 (17:45 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 22:36:12 +0000 (00:36 +0200)
tests/ChangeLog
tests/msgfilter-2

index 2056cf04b9a812c93c6f339390d692ab712fb0ab..b122aef18b97cc17ab5d14636c06a76aed6d2a6d 100644 (file)
@@ -1,3 +1,7 @@
+2002-01-05  Bruno Haible  <bruno@clisp.org>
+
+       * msgfilter-2: Skip the test if 'sed' adds extraneous newlines.
+
 2002-01-04  Bruno Haible  <bruno@clisp.org>
 
        * msgcat-2: Avoid \" to " conversion in the here documents.
index 38a480f68a7c039d68906005e2849c00d5d0c7fe..91907680f4de91ed326d28983a1c975a9ff21266 100755 (executable)
@@ -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 <<EOF > mfi-test2.po
 # HEADER.