summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/lang-bash
diff options
context:
space:
mode:
Diffstat (limited to 'gettext-tools/tests/lang-bash')
-rwxr-xr-xgettext-tools/tests/lang-bash13
1 files changed, 9 insertions, 4 deletions
diff --git a/gettext-tools/tests/lang-bash b/gettext-tools/tests/lang-bash
index 4700a0e..83a3bd0 100755
--- a/gettext-tools/tests/lang-bash
+++ b/gettext-tools/tests/lang-bash
@@ -25,14 +25,16 @@ $echo $"'Your command, please?', asked the waiter."
$echo "`eval_ngettext "a piece of cake" "\\$n pieces of cake" $n`"
EOF
-tmpfiles="$tmpfiles prog.pot prog.err"
+tmpfiles="$tmpfiles prog.tmp prog.pot prog.err"
: ${XGETTEXT=xgettext}
LC_MESSAGES=C LC_ALL= \
-${XGETTEXT} -o prog.pot --omit-header --no-location prog.sh \
+${XGETTEXT} -o prog.tmp --omit-header --no-location prog.sh \
>prog.err 2>&1
result=$?
cat prog.err | grep -v 'warning: the syntax \$"\.\.\." is deprecated due to security reasons'
test $result = 0 || { rm -fr $tmpfiles; exit 1; }
+tr -d '\r' < prog.tmp > prog.pot
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
tmpfiles="$tmpfiles prog.ok"
cat <<\EOF > prog.ok
@@ -67,9 +69,12 @@ msgstr[0] "un morceau de gateau"
msgstr[1] "$n morceaux de gateau"
EOF
-tmpfiles="$tmpfiles fr.po.new"
+tmpfiles="$tmpfiles fr.po.tmp fr.po.new"
: ${MSGMERGE=msgmerge}
-${MSGMERGE} -q -o fr.po.new fr.po prog.pot
+${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+tr -d '\r' < fr.po.tmp > fr.po.new
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
: ${DIFF=diff}
${DIFF} fr.po fr.po.new || exit 1