From: Bruno Haible Date: Sun, 16 Sep 2018 15:55:05 +0000 (+0200) Subject: Don't assume that 'sed' supports alternation in regular expressions. X-Git-Tag: v0.20~388 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f1872da93c25d1885d79e6772461ff4cf1b0c18;p=thirdparty%2Fgettext.git Don't assume that 'sed' supports alternation in regular expressions. See https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Limitations-of-Usual-Tools.html * gettext-tools/tests/msginit-1: Don't use \| in a 'sed' regular expression. * gettext-tools/tests/msginit-3: Likewise. * gettext-tools/tests/msginit-4: Likewise. --- diff --git a/gettext-tools/tests/msginit-1 b/gettext-tools/tests/msginit-1 index fa42552f3..8621f8bc9 100755 --- a/gettext-tools/tests/msginit-1 +++ b/gettext-tools/tests/msginit-1 @@ -42,7 +42,7 @@ ${MSGINIT} -i mi-test1.pot -l ga_IE --no-translator -o mi-test1.tmp 2>mi-test1.e test $? = 0 || { cat mi-test1.err 1>&2; Exit 1; } # The charset stored in the header entry is the locale encoding of the gl_IE # locale, which is system dependent, or ASCII if the locale does not exist. -sed -e '1,10d' -e 's/\(ISO-8859-1\|CP1252\|UTF-8\)/ASCII/g' < mi-test1.tmp | LC_ALL=C tr -d '\r' > mi-test1.out || Exit 1 +sed -e '1,10d' -e 's/ISO-8859-1/ASCII/g' -e 's/CP1252/ASCII/g' -e 's/UTF-8/ASCII/g' < mi-test1.tmp | LC_ALL=C tr -d '\r' > mi-test1.out || Exit 1 cat <<\EOF > mi-test1.ok "Last-Translator: Automatically generated\n" diff --git a/gettext-tools/tests/msginit-3 b/gettext-tools/tests/msginit-3 index ce971ed38..7ce27eb18 100755 --- a/gettext-tools/tests/msginit-3 +++ b/gettext-tools/tests/msginit-3 @@ -47,7 +47,7 @@ grep "Project-Id-Version: gt-msginit " mi-test3.tmp 2>&1 >/dev/null || Exit 1 # # Project-Id-Version contains version constructed from a temporary # directory name -sed -e '1,10d' -e 's/\(ISO-8859-1\|CP1252\|UTF-8\)/ASCII/g' < mi-test3.tmp | grep -v Project-Id-Version | LC_ALL=C tr -d '\r' > mi-test3.out || Exit 1 +sed -e '1,10d' -e 's/ISO-8859-1/ASCII/g' -e 's/CP1252/ASCII/g' -e 's/UTF-8/ASCII/g' < mi-test3.tmp | grep -v Project-Id-Version | LC_ALL=C tr -d '\r' > mi-test3.out || Exit 1 cat <<\EOF > mi-test3.ok "Last-Translator: Automatically generated\n" "Language-Team: none\n" diff --git a/gettext-tools/tests/msginit-4 b/gettext-tools/tests/msginit-4 index f4335f1d7..19c442eeb 100755 --- a/gettext-tools/tests/msginit-4 +++ b/gettext-tools/tests/msginit-4 @@ -52,7 +52,7 @@ test $? = 0 || { cat mi-test4.err 1>&2; Exit 1; } # # Project-Id-Version contains version constructed from a temporary # directory name -sed -e '1,10d' -e 's/\(ISO-8859-1\|CP1252\|UTF-8\)/ASCII/g' < mi-test4.tmp | grep -v Project-Id-Version | LC_ALL=C tr -d '\r' > mi-test4.out || Exit 1 +sed -e '1,10d' -e 's/ISO-8859-1/ASCII/g' -e 's/CP1252/ASCII/g' -e 's/UTF-8/ASCII/g' < mi-test4.tmp | grep -v Project-Id-Version | LC_ALL=C tr -d '\r' > mi-test4.out || Exit 1 cat <<\EOF > mi-test4.ok "Last-Translator: Automatically generated\n" "Language-Team: none\n"