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/xgettext-glade-4 | |
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/xgettext-glade-4')
-rw-r--r--[-rwxr-xr-x] | gettext-tools/tests/xgettext-glade-4 | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/gettext-tools/tests/xgettext-glade-4 b/gettext-tools/tests/xgettext-glade-4 index 546a110..e753450 100755..100644 --- a/gettext-tools/tests/xgettext-glade-4 +++ b/gettext-tools/tests/xgettext-glade-4 @@ -3,24 +3,18 @@ # Test of Glade 2 support. -tmpfiles="" -trap 'rm -fr $tmpfiles' 1 2 3 15 - -tmpfiles="$tmpfiles xg-gl-4-empty.glade" cat <<EOF > xg-gl-4-empty.glade <?xml version="1.0"?> <GTK-Interface/> EOF -tmpfiles="$tmpfiles xg-gl-4.pot" : ${XGETTEXT=xgettext} ${XGETTEXT} -o xg-gl-4.pot xg-gl-4-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-4.glade" cat <<EOF > xg-gl-4.glade <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> @@ -40,15 +34,12 @@ cat <<EOF > xg-gl-4.glade </glade-interface> EOF -tmpfiles="$tmpfiles xg-gl-4.tmp xg-gl-4.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o xg-gl-4.tmp xg-gl-4.glade -test $? = 0 || { rm -fr $tmpfiles; exit 1; } +${XGETTEXT} -o xg-gl-4.tmp xg-gl-4.glade || exit 1 # Don't simplify this to "grep ... < xg-gl-4.tmp", otherwise OpenBSD 4.0 grep # only outputs "Binary file (standard input) matches". cat xg-gl-4.tmp | grep -v 'POT-Creation-Date' > xg-gl-4.pot -tmpfiles="$tmpfiles xg-gl-4.ok" cat <<\EOF > xg-gl-4.ok # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER @@ -82,7 +73,6 @@ test $result = 0 || { rm -fr $tempfiles; exit $result } -tmpfiles="$tmpfiles xg-gl-4a.glade" cat <<EOF > xg-gl-4a.glade <?xml version="1.0"?> <glade-interface> @@ -99,14 +89,11 @@ cat <<EOF > xg-gl-4a.glade </glade-interface> EOF -tmpfiles="$tmpfiles xg-gl-4a.tmp xg-gl-4a.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o xg-gl-4a.tmp xg-gl-4a.glade -test $? = 0 || { rm -fr $tmpfiles; exit 1; } +${XGETTEXT} -o xg-gl-4a.tmp xg-gl-4a.glade || exit 1 # Look upwards cat xg-gl-4a.tmp | grep -v 'POT-Creation-Date' > xg-gl-4a.pot -tmpfiles="$tmpfiles xg-gl-4a.ok" cat <<\EOF > xg-gl-4a.ok # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER @@ -136,6 +123,4 @@ EOF ${DIFF} xg-gl-4a.ok xg-gl-4a.pot result=$? -rm -fr $tmpfiles - exit $result |