diff options
author | Daiki Ueno <ueno@gnu.org> | 2014-03-10 18:13:28 +0900 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2014-03-10 18:24:15 +0900 |
commit | d66197a3ca8355efa22f1d9c687f41eb30ae19ff (patch) | |
tree | c4acc964d617b04629a3a3bbb7632f34cdb35b9c /gettext-tools/tests/lang-pascal | |
parent | 0e79f41006d2b4d69dd3eb57c0202faa6c1fba44 (diff) | |
download | external_gettext-d66197a3ca8355efa22f1d9c687f41eb30ae19ff.zip external_gettext-d66197a3ca8355efa22f1d9c687f41eb30ae19ff.tar.gz external_gettext-d66197a3ca8355efa22f1d9c687f41eb30ae19ff.tar.bz2 |
tests: Remove unnecessary tempfile cleanup code
Cleanup code like "rm -fr $tmpfiles" are no longer needed, since
'init.sh' takes care of that.
Diffstat (limited to 'gettext-tools/tests/lang-pascal')
-rw-r--r--[-rwxr-xr-x] | gettext-tools/tests/lang-pascal | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/gettext-tools/tests/lang-pascal b/gettext-tools/tests/lang-pascal index 4032937..d269c57 100755..100644 --- a/gettext-tools/tests/lang-pascal +++ b/gettext-tools/tests/lang-pascal @@ -9,10 +9,6 @@ # This here is a quick workaround: UTF8_LOCALE_UNSUPPORTED=yes -tmpfiles="" -trap 'rm -fr $tmpfiles' 1 2 3 15 - -tmpfiles="$tmpfiles pascalprog.pp" cat <<\EOF > pascalprog.pp program pascalprog; {$mode delphi} @@ -30,22 +26,17 @@ begin end. EOF -tmpfiles="$tmpfiles pascalprog.o pascalprog.rst pascalprog" (ppc386 pascalprog.pp) >/dev/null 2>&1 || (ppcx64 pascalprog.pp) >/dev/null 2>&1 || { echo "Skipping test: Pascal compiler ppc386 or ppcx64 not found" - rm -fr $tmpfiles; exit 77 + exit 77 } -tmpfiles="$tmpfiles l-pascal-pascalprog.tmp l-pascal-pascalprog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-pascal-pascalprog.tmp --omit-header --add-location pascalprog.rst -test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < l-pascal-pascalprog.tmp > l-pascal-pascalprog.pot -test $? = 0 || { rm -fr $tmpfiles; exit 1; } +${XGETTEXT} -o l-pascal-pascalprog.tmp --omit-header --add-location pascalprog.rst || exit 1 +LC_ALL=C tr -d '\r' < l-pascal-pascalprog.tmp > l-pascal-pascalprog.pot || exit 1 -tmpfiles="$tmpfiles l-pascal-pascalprog.ok" cat <<EOF > l-pascal-pascalprog.ok #: pascalprog.question msgid "'Your command, please?', asked the waiter." @@ -60,7 +51,6 @@ EOF : ${DIFF=diff} ${DIFF} l-pascal-pascalprog.ok l-pascal-pascalprog.pot || exit 1 -tmpfiles="$tmpfiles l-pascal-fr.po" cat <<\EOF > l-pascal-fr.po msgid "" msgstr "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -76,17 +66,13 @@ msgid "%s is replaced by %s." msgstr "%1:s remplace %0:s." EOF -tmpfiles="$tmpfiles l-pascal-fr.po.tmp l-pascal-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-pascal-fr.po.tmp l-pascal-fr.po l-pascal-pascalprog.pot -test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < l-pascal-fr.po.tmp > l-pascal-fr.po.new -test $? = 0 || { rm -fr $tmpfiles; exit 1; } +${MSGMERGE} -q -o l-pascal-fr.po.tmp l-pascal-fr.po l-pascal-pascalprog.pot || exit 1 +LC_ALL=C tr -d '\r' < l-pascal-fr.po.tmp > l-pascal-fr.po.new || exit 1 : ${DIFF=diff} ${DIFF} l-pascal-fr.po l-pascal-fr.po.new || exit 1 -tmpfiles="$tmpfiles l-pascal" test -d l-pascal || mkdir l-pascal test -d l-pascal/fr || mkdir l-pascal/fr test -d l-pascal/fr/LC_MESSAGES || mkdir l-pascal/fr/LC_MESSAGES @@ -94,7 +80,6 @@ test -d l-pascal/fr/LC_MESSAGES || mkdir l-pascal/fr/LC_MESSAGES : ${MSGFMT=msgfmt} ${MSGFMT} -o l-pascal/fr/LC_MESSAGES/pascalprog.mo l-pascal-fr.po -tmpfiles="$tmpfiles l-pascal-pascalprog.ok l-pascal-pascalprog.oku l-pascal-pascalprog.out" : ${DIFF=diff} cat <<\EOF > l-pascal-pascalprog.ok «Votre commande, s'il vous plait», dit le garçon. @@ -124,7 +109,7 @@ if test -z "$UTF8_LOCALE_UNSUPPORTED"; then else echo "Skipping test: no french locale is supported" fi - rm -fr $tmpfiles; exit 77 + exit 77 fi else if test $LOCALE_FR = none; then @@ -133,10 +118,8 @@ else else echo "Skipping test: no traditional french locale is supported" fi - rm -fr $tmpfiles; exit 77 + exit 77 fi fi -rm -fr $tmpfiles - exit 0 |