From: Bruno Haible Date: Fri, 19 Oct 2007 20:55:58 +0000 (+0000) Subject: Avoid test failure on mingw. X-Git-Tag: v0.17~105 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3eaf48f8534aa8da26312fbcf5443940fa5fcd9f;p=thirdparty%2Fgettext.git Avoid test failure on mingw. --- diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index 8be2cce14..b38643b57 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -18,6 +18,7 @@ * xgettext-python-3: Likewise. * xgettext-stringtable-1: Likewise. * xgettext-tcl-1: Likewise. + * plural-1: Convert CR/LF to LF before applying DIFF. 2007-10-09 Bruno Haible diff --git a/gettext-tools/tests/format-perl-mixed-1 b/gettext-tools/tests/format-perl-mixed-1 index 3b3a84b89..6f1210417 100755 --- a/gettext-tools/tests/format-perl-mixed-1 +++ b/gettext-tools/tests/format-perl-mixed-1 @@ -44,7 +44,7 @@ EOF fail= if test -n "${formats}"; then # Verify that the first line contains the expected #, comment. - if sed 1q < f-pm-1-$n.po | grep '^'"${formats}"'$' > /dev/null; then + if sed 1q < f-pm-1-$n.po | tr -d '\r' | grep '^'"${formats}"'$' > /dev/null; then : else fail=yes diff --git a/gettext-tools/tests/plural-1 b/gettext-tools/tests/plural-1 index 7dcedb915..f62807c79 100755 --- a/gettext-tools/tests/plural-1 +++ b/gettext-tools/tests/plural-1 @@ -62,16 +62,19 @@ sed 1,2d < fr.po > fr.po.strip : ${DIFF=diff} ${DIFF} fr.po.strip fr.po.un || exit 1 -tmpfiles="$tmpfiles cake.ok cake.out" +tmpfiles="$tmpfiles cake.ok cake.tmp cake.out" : ${DIFF=diff} echo 'un morceau de gateau' > cake.ok -LANGUAGE= ./cake fr 1 > cake.out || exit 1 +LANGUAGE= ./cake fr 1 > cake.tmp || exit 1 +tr -d '\r' < cake.tmp > cake.out || exit 1 ${DIFF} cake.ok cake.out || exit 1 echo '2 morceaux de gateau' > cake.ok -LANGUAGE= ./cake fr 2 > cake.out || exit 1 +LANGUAGE= ./cake fr 2 > cake.tmp || exit 1 +tr -d '\r' < cake.tmp > cake.out || exit 1 ${DIFF} cake.ok cake.out || exit 1 echo '10 morceaux de gateau' > cake.ok -LANGUAGE= ./cake fr 10 > cake.out || exit 1 +LANGUAGE= ./cake fr 10 > cake.tmp || exit 1 +tr -d '\r' < cake.tmp > cake.out || exit 1 ${DIFF} cake.ok cake.out || exit 1 rm -fr $tmpfiles