Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / format-sh-1
index 6bbb32f..e274a7b 100755 (executable)
@@ -1,11 +1,8 @@
 #! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
 
 # Test recognition of Shell format strings.
 
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles f-sh-1.data"
 cat <<\EOF > f-sh-1.data
 # Invalid: no argument
 "abc"
@@ -40,8 +37,7 @@ n=0
 while read comment; do
   read string
   n=`expr $n + 1`
-  tmpfiles="$tmpfiles f-sh-1-$n.in f-sh-1-$n.po"
-  sed -e 's,\$,\\$,g' <<EOF > f-sh-1-$n.in
+  LC_ALL=C sed -e 's,\$,\\$,g' <<EOF > f-sh-1-$n.in
 gettext ${string};
 EOF
   ${XGETTEXT} -L Shell --from-code=ISO-8859-1 -o f-sh-1-$n.po f-sh-1-$n.in || exit 1
@@ -70,6 +66,4 @@ EOF
   rm -f f-sh-1-$n.in f-sh-1-$n.po
 done < f-sh-1.data
 
-rm -fr $tmpfiles
-
 exit 0