summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/xgettext-glade-6
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2014-03-10 18:13:28 +0900
committerDaiki Ueno <ueno@gnu.org>2014-03-10 18:24:15 +0900
commitd66197a3ca8355efa22f1d9c687f41eb30ae19ff (patch)
treec4acc964d617b04629a3a3bbb7632f34cdb35b9c /gettext-tools/tests/xgettext-glade-6
parent0e79f41006d2b4d69dd3eb57c0202faa6c1fba44 (diff)
downloadexternal_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/xgettext-glade-6')
-rw-r--r--[-rwxr-xr-x]gettext-tools/tests/xgettext-glade-620
1 files changed, 4 insertions, 16 deletions
diff --git a/gettext-tools/tests/xgettext-glade-6 b/gettext-tools/tests/xgettext-glade-6
index b541843..49fecf8 100755..100644
--- a/gettext-tools/tests/xgettext-glade-6
+++ b/gettext-tools/tests/xgettext-glade-6
@@ -5,24 +5,18 @@
# Checks that the extracted pot contains the right translatable
# content, comments and context.
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles xg-gl-6-empty.glade"
cat <<EOF > xg-gl-6-empty.glade
<?xml version="1.0"?>
<GTK-Interface/>
EOF
-tmpfiles="$tmpfiles xg-gl-6.pot"
: ${XGETTEXT=xgettext}
${XGETTEXT} -o xg-gl-6.pot xg-gl-6-empty.glade 2>/dev/null
test $? = 0 || {
echo "Skipping test: xgettext was built without Glade support"
- rm -fr $tmpfiles; exit 77
+ exit 77
}
-tmpfiles="$tmpfiles xg-gl-6.ui"
cat <<EOF > xg-gl-6.ui
<?xml version="1.0" encoding="UTF-8"?>
<interface>
@@ -37,12 +31,9 @@ cat <<EOF > xg-gl-6.ui
</interface>
EOF
-tmpfiles="$tmpfiles xg-gl-6.pot"
: ${XGETTEXT=xgettext}
-${XGETTEXT} -o - xg-gl-6.ui | grep -v 'POT-Creation-Date' > xg-gl-6.pot
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${XGETTEXT} -o - xg-gl-6.ui | grep -v 'POT-Creation-Date' > xg-gl-6.pot || exit 1
-tmpfiles="$tmpfiles xg-gl-6.ok"
cat <<EOF > xg-gl-6.ok
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
@@ -74,17 +65,14 @@ ${DIFF} xg-gl-6.ok xg-gl-6.pot
result=$?
test $result = 0 || {
- rm -fr $tmpfiles; exit $result
+ exit $result
}
# Check with --extract-all option.
-${XGETTEXT} -a -o - xg-gl-6.ui | grep -v 'POT-Creation-Date' > xg-gl-6.pot
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${XGETTEXT} -a -o - xg-gl-6.ui | grep -v 'POT-Creation-Date' > xg-gl-6.pot || exit 1
# Must be ignored.
${DIFF} xg-gl-6.ok xg-gl-6.pot
result=$?
-rm -fr $tmpfiles
-
exit $result