X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gettext-tools%2Ftests%2Fmsgcat-3;h=990b612f859bfc10c2108ffeb25b5d5d30477157;hb=refs%2Fchanges%2F82%2F71082%2F1;hp=f947d02e3dcd096b29fa5fe309e0f24c316183f3;hpb=90a3363ce7c017439e9953fd5e832fbef8db0dd5;p=platform%2Fupstream%2Fgettext.git diff --git a/gettext-tools/tests/msgcat-3 b/gettext-tools/tests/msgcat-3 index f947d02..990b612 100755 --- a/gettext-tools/tests/msgcat-3 +++ b/gettext-tools/tests/msgcat-3 @@ -1,12 +1,9 @@ #! /bin/sh +. "${srcdir=.}/init.sh"; path_prepend_ . ../src # Test handling of input files with different charsets. # 1. ISO-8859-1, 2. UTF-8; plus --use-first -tmpfiles="" -trap 'rm -fr $tmpfiles' 1 2 3 15 - -tmpfiles="$tmpfiles mcat-test3.in1 mcat-test3.in2" cat <<\EOF > mcat-test3.in1 # German message file for xyz. # Copyright (C) 1999, 2000, 2001 xyz. @@ -54,7 +51,6 @@ msgid "You can log in as \"%1\"." msgstr "Sie können sich als \"%1\" einloggen." EOF -tmpfiles="$tmpfiles mcat-test3.tmp mcat-test3.err mcat-test3.out" rm -f mcat-test3.tmp : ${MSGCAT=msgcat} @@ -63,11 +59,9 @@ ${MSGCAT} --use-first --more-than=0 -o mcat-test3.tmp \ mcat-test3.in1 mcat-test3.in2 >mcat-test3.err 2>&1 result=$? cat mcat-test3.err | grep -v 'warning: .* encodings' | grep -v '^ ' -test $result = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < mcat-test3.tmp > mcat-test3.out -test $? = 0 || { rm -fr $tmpfiles; exit 1; } +test $result = 0 || { exit 1; } +LC_ALL=C tr -d '\r' < mcat-test3.tmp > mcat-test3.out || exit 1 -tmpfiles="$tmpfiles mcat-test3.ok" cat << \EOF > mcat-test3.ok # German message file for xyz. # Copyright (C) 1999, 2000, 2001 xyz. @@ -100,6 +94,4 @@ EOF ${DIFF} mcat-test3.ok mcat-test3.out result=$? -rm -fr $tmpfiles - exit $result