Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / xgettext-ycp-3
index 75ca2ad..6325db6 100755 (executable)
@@ -1,11 +1,8 @@
 #!/bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
 
 # Test YCP support: string literal concatenation.
 
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles xg-y-3.ycp"
 cat <<\EOF > xg-y-3.ycp
 print (_("John\n"
 "Paul\n"
@@ -13,14 +10,10 @@ print (_("John\n"
 "Ringo"));
 EOF
 
-tmpfiles="$tmpfiles xg-y-3.tmp.po xg-y-3.po"
 : ${XGETTEXT=xgettext}
-${XGETTEXT} --omit-header --no-location -d xg-y-3.tmp xg-y-3.ycp
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < xg-y-3.tmp.po > xg-y-3.po
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${XGETTEXT} --omit-header --no-location -d xg-y-3.tmp xg-y-3.ycp || exit 1
+LC_ALL=C tr -d '\r' < xg-y-3.tmp.po > xg-y-3.po || exit 1
 
-tmpfiles="$tmpfiles xg-y-3.ok"
 cat <<\EOF > xg-y-3.ok
 msgid ""
 "John\n"
@@ -33,6 +26,4 @@ EOF
 ${DIFF} xg-y-3.ok xg-y-3.po
 result=$?
 
-rm -fr $tmpfiles
-
 exit $result