Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msguniq-5
index 3e784e1..530efab 100755 (executable)
@@ -1,11 +1,8 @@
 #! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
 
 # Test msguniq on a PO file with contexts.
 
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles msguniq-5.po"
 cat <<\EOF > msguniq-5.po
 msgid ""
 msgstr ""
@@ -56,14 +53,10 @@ msgstr "photocopieur"
 #~ msgstr "Enregistrer sous"
 EOF
 
-tmpfiles="$tmpfiles msguniq-5.tmp msguniq-5.out"
 : ${MSGUNIQ-msguniq}
-${MSGUNIQ} -o msguniq-5.tmp msguniq-5.po
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < msguniq-5.tmp > msguniq-5.out
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${MSGUNIQ} -o msguniq-5.tmp msguniq-5.po || exit 1
+LC_ALL=C tr -d '\r' < msguniq-5.tmp > msguniq-5.out || exit 1
 
-tmpfiles="$tmpfiles msguniq-5.ok"
 cat <<\EOF > msguniq-5.ok
 msgid ""
 msgstr ""
@@ -113,6 +106,4 @@ EOF
 ${DIFF} msguniq-5.ok msguniq-5.out
 result=$?
 
-rm -fr $tmpfiles
-
 exit $result