X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gettext-tools%2Ftests%2Fxgettext-c-12;h=2e9d7fdac89594f0034456fb18b8ef785ff899e2;hb=refs%2Fchanges%2F82%2F71082%2F1;hp=b138dcbb7e5b789b703a0423d1d889c0bcf3b318;hpb=90a3363ce7c017439e9953fd5e832fbef8db0dd5;p=platform%2Fupstream%2Fgettext.git diff --git a/gettext-tools/tests/xgettext-c-12 b/gettext-tools/tests/xgettext-c-12 index b138dcb..2e9d7fd 100755 --- a/gettext-tools/tests/xgettext-c-12 +++ b/gettext-tools/tests/xgettext-c-12 @@ -1,24 +1,17 @@ #! /bin/sh +. "${srcdir=.}/init.sh"; path_prepend_ . ../src # Test C support: valid but unlikely C format strings are _not_ marked as # c-format by default. -tmpfiles="" -trap 'rm -fr $tmpfiles' 1 2 3 15 - -tmpfiles="$tmpfiles xg-c-12.c" cat <<\EOF > xg-c-12.c gettext ("%1% on, %2% off"); EOF -tmpfiles="$tmpfiles xg-c-12.tmp.po xg-c-12.po" : ${XGETTEXT=xgettext} -${XGETTEXT} --omit-header --no-location -d xg-c-12.tmp xg-c-12.c -test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < xg-c-12.tmp.po > xg-c-12.po -test $? = 0 || { rm -fr $tmpfiles; exit 1; } +${XGETTEXT} --omit-header --no-location -d xg-c-12.tmp xg-c-12.c || exit 1 +LC_ALL=C tr -d '\r' < xg-c-12.tmp.po > xg-c-12.po || exit 1 -tmpfiles="$tmpfiles xg-c-12.ok" cat < xg-c-12.ok msgid "%1% on, %2% off" msgstr "" @@ -28,6 +21,4 @@ EOF ${DIFF} xg-c-12.ok xg-c-12.po result=$? -rm -fr $tmpfiles - exit $result