summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/xgettext-glade-5
diff options
context:
space:
mode:
Diffstat (limited to 'gettext-tools/tests/xgettext-glade-5')
-rw-r--r--[-rwxr-xr-x]gettext-tools/tests/xgettext-glade-528
1 files changed, 6 insertions, 22 deletions
diff --git a/gettext-tools/tests/xgettext-glade-5 b/gettext-tools/tests/xgettext-glade-5
index 9df133a..3877808 100755..100644
--- a/gettext-tools/tests/xgettext-glade-5
+++ b/gettext-tools/tests/xgettext-glade-5
@@ -3,24 +3,18 @@
# Test of Glade 2 support for msgctxt.
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles xg-gl-5-empty.glade"
cat <<EOF > xg-gl-5-empty.glade
<?xml version="1.0"?>
<GTK-Interface/>
EOF
-tmpfiles="$tmpfiles xg-gl-5.pot"
: ${XGETTEXT=xgettext}
${XGETTEXT} -o xg-gl-5.pot xg-gl-5-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-5.glade"
cat <<EOF > xg-gl-5.glade
<?xml version="1.0"?>
<glade-interface>
@@ -59,15 +53,12 @@ cat <<EOF > xg-gl-5.glade
</glade-interface>
EOF
-tmpfiles="$tmpfiles xg-gl-5.tmp xg-gl-5.pot"
: ${XGETTEXT=xgettext}
-${XGETTEXT} -o xg-gl-5.tmp xg-gl-5.glade
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${XGETTEXT} -o xg-gl-5.tmp xg-gl-5.glade || exit 1
# Don't simplify this to "grep ... < xg-gl-5.tmp", otherwise OpenBSD 4.0 grep
# only outputs "Binary file (standard input) matches".
cat xg-gl-5.tmp | grep -v 'POT-Creation-Date' > xg-gl-5.pot
-tmpfiles="$tmpfiles xg-gl-5.ok"
cat <<\EOF > xg-gl-5.ok
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
@@ -102,13 +93,12 @@ ${DIFF} xg-gl-5.ok xg-gl-5.pot
result=$?
test $result = 0 || {
- rm -fr $tmpfiles; exit $result
+ exit $result
}
# Check with --extract-all option
rm xg-gl-5.tmp
-${XGETTEXT} -a -o xg-gl-5.tmp xg-gl-5.glade
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${XGETTEXT} -a -o xg-gl-5.tmp xg-gl-5.glade || exit 1
# Don't simplify this to "grep ... < xg-gl-5.tmp", otherwise OpenBSD 4.0 grep
# only outputs "Binary file (standard input) matches".
cat xg-gl-5.tmp | grep -v 'POT-Creation-Date' > xg-gl-5.pot
@@ -117,10 +107,9 @@ ${DIFF} xg-gl-5.ok xg-gl-5.pot
result=$?
test $result = 0 || {
- rm -fr $tmpfiles; exit $result
+ exit $result
}
-tmpfiles="$tmpfiles xg-gl-5b.glade"
cat <<EOF > xg-gl-5b.glade
<?xml version="1.0"?>
<glade-interface>
@@ -159,15 +148,12 @@ cat <<EOF > xg-gl-5b.glade
</glade-interface>
EOF
-tmpfiles="$tmpfiles xg-gl-5b.tmp xg-gl-5b.pot"
: ${XGETTEXT=xgettext}
-${XGETTEXT} -o xg-gl-5b.tmp xg-gl-5b.glade 2>/dev/null
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${XGETTEXT} -o xg-gl-5b.tmp xg-gl-5b.glade 2>/dev/null || exit 1
# Don't simplify this to "grep ... < xg-gl-5b.tmp", otherwise OpenBSD 4.0 grep
# only outputs "Binary file (standard input) matches".
cat xg-gl-5b.tmp | grep -v 'POT-Creation-Date' > xg-gl-5b.pot
-tmpfiles="$tmpfiles xg-gl-5b.ok"
cat <<\EOF > xg-gl-5b.ok
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
@@ -196,6 +182,4 @@ EOF
${DIFF} xg-gl-5b.ok xg-gl-5b.pot
result=$?
-rm -fr $tmpfiles
-
exit $result