]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Don't assume that 'sed' supports alternation in regular expressions.
authorBruno Haible <bruno@clisp.org>
Sun, 16 Sep 2018 15:55:05 +0000 (17:55 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 16 Sep 2018 15:55:05 +0000 (17:55 +0200)
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.

gettext-tools/tests/msginit-1
gettext-tools/tests/msginit-3
gettext-tools/tests/msginit-4

index fa42552f38c2a29a27a871e11db00786cf655ca1..8621f8bc9558b3dcfead8a0581a251414d320aed 100755 (executable)
@@ -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"
index ce971ed38a23f67c72a60658152877b9e2178488..7ce27eb18d8dc3ccdf69f2abdab03ba62b95b7a4 100755 (executable)
@@ -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"
index f4335f1d76b1349cc19de2ceeeb43357862681ff..19c442eeb141372a673f5c2639ec798ba6cab6d8 100755 (executable)
@@ -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"