X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gettext-tools%2Ftests%2Fmsgfmt-2;h=4a24487f440d45539de1ebfa3f040e73262d3435;hb=refs%2Fchanges%2F82%2F71082%2F1;hp=743ab0817e727fe847a3b3a3a7e742f44872d6ca;hpb=5d61132f836323aaf2879e04abc9d4056db248a2;p=platform%2Fupstream%2Fgettext.git diff --git a/gettext-tools/tests/msgfmt-2 b/gettext-tools/tests/msgfmt-2 index 743ab08..4a24487 100755 --- a/gettext-tools/tests/msgfmt-2 +++ b/gettext-tools/tests/msgfmt-2 @@ -1,4 +1,5 @@ #! /bin/sh +. "${srcdir=.}/init.sh"; path_prepend_ . ../src # Test basic functionality, duplicate detection, multiple domains. @@ -14,14 +15,9 @@ else ac_n= ac_c='\c' ac_t= fi -tmpfiles="" -trap 'rm -fr $tmpfiles' 1 2 3 15 - -tmpfiles="$tmpfiles mf-2" test -d mf-2 || mkdir mf-2 test -d mf-2/LC_MESSAGES || mkdir mf-2/LC_MESSAGES -tmpfiles="$tmpfiles mf-2-module1.po mf-2-module2.po" cat < mf-2-module1.po #default domain "messages.mo" msgid "SYS_(C)\n" @@ -60,30 +56,22 @@ EOF # Without use of msgcat, expect a "duplicate message definition" error. : ${MSGFMT=msgfmt} if ${MSGFMT} -o mf-2/LC_MESSAGES/gen.mo mf-2-module1.po mf-2-module2.po 2> /dev/null; then - rm -fr $tmpfiles exit 1 fi # With msgcat, it should work. -tmpfiles="$tmpfiles mf-2-modules.po" : ${MSGCAT=msgcat} ${MSGFMT=msgfmt} -${MSGCAT} --use-first -o mf-2-modules.po mf-2-module1.po mf-2-module2.po -test $? = 0 || { rm -fr $tmpfiles; exit 1; } -${MSGFMT} -o mf-2/LC_MESSAGES/gen.mo mf-2-modules.po -test $? = 0 || { rm -fr $tmpfiles; exit 1; } +${MSGCAT} --use-first -o mf-2-modules.po mf-2-module1.po mf-2-module2.po || exit 1 +${MSGFMT} -o mf-2/LC_MESSAGES/gen.mo mf-2-modules.po || exit 1 -tmpfiles="$tmpfiles mf-test2.out" : ${GETTEXT=gettext} TEXTDOMAINDIR=. LANGUAGE=mf-2 \ ${GETTEXT} --env LC_ALL=en gen 'error 3' > mf-test2.out -tmpfiles="$tmpfiles gtmf-test2.ok" echo $ac_n "error 3 translation$ac_c" > gtmf-test2.ok : ${DIFF=diff} ${DIFF} gtmf-test2.ok mf-test2.out result=$? -rm -fr $tmpfiles - exit $result