* xgettext-3: Verify the exit code of the xgettext invocation.
* xgettext-4: Likewise.
* xgettext-appdata-1: Likewise.
* xgettext-c-19: Likewise.
* xgettext-c-20: Likewise.
* xgettext-c-21: Likewise.
* xgettext-csharp-2: Likewise.
* xgettext-csharp-3: Likewise.
* xgettext-csharp-8: Likewise.
* xgettext-desktop-1: Likewise.
* xgettext-glade-1: Likewise.
* xgettext-glade-6: Likewise.
* xgettext-glade-7: Likewise.
* xgettext-gsettings-1: Likewise.
* xgettext-perl-2: Likewise.
* xgettext-perl-3: Likewise.
: ${XGETTEXT=xgettext}
# delete POT-Creation-Date: line because the date depends on local time.
-${XGETTEXT} --output - --no-location -k_ xg-test3.in.c 2>/dev/null \
- | sed '/\"POT-Creation-Date:.*/d' | LC_ALL=C tr -d '\r' > xg-test3.po
+${XGETTEXT} --output xg-test3.tmp --no-location -k_ xg-test3.in.c 2>/dev/null || Exit 1
+sed -e '/\"POT-Creation-Date:.*/d' < xg-test3.tmp | LC_ALL=C tr -d '\r' > xg-test3.po
cat <<EOF > xg-test3.ok
# SOME DESCRIPTIVE TITLE.
: ${XGETTEXT=xgettext}
# delete POT-Creation-Date: line because the date depends on local time.
-${XGETTEXT} --output - --foreign-user --no-location -k_ xg-test4.in.c \
- | sed '/\"POT-Creation-Date:.*/d' | LC_ALL=C tr -d '\r' > xg-test4.po
+${XGETTEXT} --output xg-test4.tmp --foreign-user --no-location -k_ xg-test4.in.c || Exit 1
+sed -e '/\"POT-Creation-Date:.*/d' < xg-test4.tmp | LC_ALL=C tr -d '\r' > xg-test4.po
cat <<EOF > xg-test4.ok
# SOME DESCRIPTIVE TITLE.
EOF
: ${XGETTEXT=xgettext}
-${XGETTEXT} --add-comments -o - xg-gs-1.appdata.xml | grep -v 'POT-Creation-Date' > xg-gs-1.pot || Exit 1
+${XGETTEXT} --add-comments -o xg-gs-1.tmp xg-gs-1.appdata.xml || Exit 1
+grep -v 'POT-Creation-Date' < xg-gs-1.tmp > xg-gs-1.pot || Exit 1
cat <<EOF > xg-gs-1.ok
# SOME DESCRIPTIVE TITLE.
|| { echo "Skipping test: iconv does not work for EUC-JP"; Exit 77; }
${XGETTEXT} --from-code=EUC-JP --add-comments --no-location --no-wrap \
- -o - xg-c-19.c | grep -v 'POT-Creation-Date' > xg-c-19.tmp.po \
- || Exit 1
-LC_ALL=C tr -d '\r' < xg-c-19.tmp.po > xg-c-19.po || Exit 1
+ -o xg-c-19.tmp xg-c-19.c || Exit 1
+grep -v 'POT-Creation-Date' < xg-c-19.tmp > xg-c-19.tmq || Exit 1
+LC_ALL=C tr -d '\r' < xg-c-19.tmq > xg-c-19.po || Exit 1
cat <<\EOF > xg-c-19.ok
# SOME DESCRIPTIVE TITLE.
EOF
${XGETTEXT} --add-comments --no-location --no-wrap \
- -o - xg-c-20.cc | grep -v 'POT-Creation-Date' > xg-c-20.tmp.po \
- || Exit 1
-LC_ALL=C tr -d '\r' < xg-c-20.tmp.po > xg-c-20.po || Exit 1
+ -o xg-c-20.tmp xg-c-20.cc || Exit 1
+grep -v 'POT-Creation-Date' < xg-c-20.tmp > xg-c-20.tmq || Exit 1
+LC_ALL=C tr -d '\r' < xg-c-20.tmq > xg-c-20.po || Exit 1
cat <<\EOF > xg-c-20.ok
# SOME DESCRIPTIVE TITLE.
EOF
${XGETTEXT} --add-comments --no-location --no-wrap \
- -o - xg-c-20.c | grep -v 'POT-Creation-Date' > xg-c-20c.tmp.po \
- || Exit 1
-LC_ALL=C tr -d '\r' < xg-c-20c.tmp.po > xg-c-20c.po || Exit 1
+ -o xg-c-20c.tmp xg-c-20.c || Exit 1
+grep -v 'POT-Creation-Date' < xg-c-20c.tmp > xg-c-20c.tmq || Exit 1
+LC_ALL=C tr -d '\r' < xg-c-20c.tmq > xg-c-20c.po || Exit 1
cat <<\EOF > xg-c-20c.ok
# SOME DESCRIPTIVE TITLE.
: ${XGETTEXT=xgettext}
${XGETTEXT} --add-comments --no-location --no-wrap \
- -o - "$abs_srcdir"/xg-c-21.c \
- | grep -v 'POT-Creation-Date' > xg-c-21.tmp.po || Exit 1
-LC_ALL=C tr -d '\r' < xg-c-21.tmp.po > xg-c-21.po || Exit 1
+ -o xg-c-21.tmp "$abs_srcdir"/xg-c-21.c || Exit 1
+grep -v 'POT-Creation-Date' < xg-c-21.tmp > xg-c-21.tmq || Exit 1
+LC_ALL=C tr -d '\r' < xg-c-21.tmq > xg-c-21.po || Exit 1
cat <<\EOF > xg-c-21.ok
# SOME DESCRIPTIVE TITLE.
: ${XGETTEXT=xgettext}
# delete POT-Creation-Date: line because the date depends on local time.
-${XGETTEXT} --output - --add-location -c --from-code=UTF-8 xg-cs-2.cs \
- | sed '/\"POT-Creation-Date:.*/d' | LC_ALL=C tr -d '\r' > xg-cs-2.po || Exit 1
+${XGETTEXT} --output xg-cs-2.tmp --add-location -c --from-code=UTF-8 xg-cs-2.cs || Exit 1
+sed -e '/\"POT-Creation-Date:.*/d' < xg-cs-2.tmp | LC_ALL=C tr -d '\r' > xg-cs-2.po || Exit 1
cat <<\EOF > xg-cs-2.ok
# SOME DESCRIPTIVE TITLE.
: ${XGETTEXT=xgettext}
# delete POT-Creation-Date: line because the date depends on local time.
-${XGETTEXT} --output - --add-location -c -kMyGetString:2 xg-cs-3.cs 2>/dev/null \
- | sed '/\"POT-Creation-Date:.*/d' | LC_ALL=C tr -d '\r' > xg-cs-3.po || Exit 1
+${XGETTEXT} --output xg-cs-3.tmp --add-location -c -kMyGetString:2 xg-cs-3.cs 2>/dev/null || Exit 1
+sed -e '/\"POT-Creation-Date:.*/d' < xg-cs-3.tmp | LC_ALL=C tr -d '\r' > xg-cs-3.po || Exit 1
cat <<\EOF > xg-cs-3.ok
# SOME DESCRIPTIVE TITLE.
EOF
: ${XGETTEXT=xgettext}
-${XGETTEXT} --output - --add-location xg-cs-8.cs -a 2>/dev/null | \
- sed '/\"POT-Creation-Date:.*/d' | LC_ALL=C tr -d '\r' > xg-cs-8.po || \
- Exit 1
+${XGETTEXT} --output xg-cs-8.tmp --add-location xg-cs-8.cs -a 2>/dev/null || Exit 1
+sed -e '/\"POT-Creation-Date:.*/d' < xg-cs-8.tmp | LC_ALL=C tr -d '\r' > xg-cs-8.po || Exit 1
cat <<\EOF > xg-cs-8.ok
# SOME DESCRIPTIVE TITLE.
Keywords=Keyword1;Keyword2;Key\;word3;
EOF
-${XGETTEXT} --add-comments -o - xg.desktop | grep -v 'POT-Creation-Date' > xg-desktop.pot || Exit 1
+${XGETTEXT} --add-comments -o xg-de-1.tmp xg.desktop || Exit 1
+grep -v 'POT-Creation-Date' < xg-de-1.tmp > xg-desktop.pot || Exit 1
cat <<\EOF > xg-desktop.ok
# SOME DESCRIPTIVE TITLE.
EOF
: ${XGETTEXT=xgettext}
-${XGETTEXT} --add-comments -o - xg-gl-1-widgets.glade | grep -v 'POT-Creation-Date' > xg-gl-1.pot || Exit 1
+${XGETTEXT} --add-comments -o xg-gl-1.tmp xg-gl-1-widgets.glade || Exit 1
+grep -v 'POT-Creation-Date' < xg-gl-1.tmp > xg-gl-1.pot || Exit 1
cat <<EOF > xg-gl-1.ok
# SOME DESCRIPTIVE TITLE.
EOF
: ${XGETTEXT=xgettext}
-${XGETTEXT} -o - xg-gl-6.ui | grep -v 'POT-Creation-Date' > xg-gl-6.pot || Exit 1
+${XGETTEXT} -o xg-gl-6.tmp xg-gl-6.ui || Exit 1
+grep -v 'POT-Creation-Date' < xg-gl-6.tmp > xg-gl-6.pot || Exit 1
cat <<EOF > xg-gl-6.ok
# SOME DESCRIPTIVE TITLE.
}
# Check with --extract-all option.
-${XGETTEXT} -a -o - xg-gl-6.ui | grep -v 'POT-Creation-Date' > xg-gl-6.pot || Exit 1
+${XGETTEXT} -a -o xg-gl-6.tmp xg-gl-6.ui || Exit 1
+grep -v 'POT-Creation-Date' < xg-gl-6.tmp > xg-gl-6.pot || Exit 1
# Must be ignored.
${DIFF} xg-gl-6.ok xg-gl-6.pot
EOF
: ${XGETTEXT=xgettext}
-${XGETTEXT} -o - xg-gl-7.ui | grep -v 'POT-Creation-Date' > xg-gl-7.pot || Exit 1
+${XGETTEXT} -o xg-gl-7.tmp xg-gl-7.ui || Exit 1
+grep -v 'POT-Creation-Date' < xg-gl-7.tmp > xg-gl-7.pot || Exit 1
cat <<\EOF > xg-gl-7.ok
# SOME DESCRIPTIVE TITLE.
EOF
: ${XGETTEXT=xgettext}
-${XGETTEXT} --add-comments -o - xg-gs-1.gschema.xml | grep -v 'POT-Creation-Date' > xg-gs-1.pot || Exit 1
+${XGETTEXT} --add-comments -o xg-gs-1.tmp xg-gs-1.gschema.xml || Exit 1
+grep -v 'POT-Creation-Date' < xg-gs-1.tmp > xg-gs-1.pot || Exit 1
cat <<EOF > xg-gs-1.ok
# SOME DESCRIPTIVE TITLE.
: ${XGETTEXT=xgettext}
# delete POT-Creation-Date: line because the date depends on local time.
-${XGETTEXT} --output - --from-code=ISO-8859-1 xg-pl-2.pl \
- | sed '/\"POT-Creation-Date:.*/d' | LC_ALL=C tr -d '\r' > xg-pl-2.po || Exit 1
+${XGETTEXT} --output xg-pl-2.tmp --from-code=ISO-8859-1 xg-pl-2.pl || Exit 1
+sed -e '/\"POT-Creation-Date:.*/d' < xg-pl-2.tmp | LC_ALL=C tr -d '\r' > xg-pl-2.po || Exit 1
cat <<\EOF > xg-pl-2.ok
# SOME DESCRIPTIVE TITLE.
: ${XGETTEXT=xgettext}
# delete POT-Creation-Date: line because the date depends on local time.
-${XGETTEXT} --output - --from-code=UTF-8 xg-pl-3.pl \
- | sed '/\"POT-Creation-Date:.*/d' | LC_ALL=C tr -d '\r' > xg-pl-3.po || Exit 1
+${XGETTEXT} --output xg-pl-3.tmp --from-code=UTF-8 xg-pl-3.pl || Exit 1
+sed -e '/\"POT-Creation-Date:.*/d' < xg-pl-3.tmp | LC_ALL=C tr -d '\r' > xg-pl-3.po || Exit 1
cat <<\EOF > xg-pl-3.ok
# SOME DESCRIPTIVE TITLE.