X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gettext-tools%2Ftests%2Fformat-c-4;h=edfdc4e7e0d2cb2da0d55fd3978e8de4a3a9ff7a;hb=refs%2Fchanges%2F82%2F71082%2F1;hp=aef04d5e0ff00d7faee62e72c5f938e41cb71ef9;hpb=5d61132f836323aaf2879e04abc9d4056db248a2;p=platform%2Fupstream%2Fgettext.git diff --git a/gettext-tools/tests/format-c-4 b/gettext-tools/tests/format-c-4 index aef04d5..edfdc4e 100755 --- a/gettext-tools/tests/format-c-4 +++ b/gettext-tools/tests/format-c-4 @@ -1,18 +1,12 @@ #! /bin/sh +. "${srcdir=.}/init.sh"; path_prepend_ . ../src # Test ISO C 99 format string directives with plural forms. -tmpfiles="" -trap 'rm -fr $tmpfiles' 1 2 3 15 - -tmpfiles="$tmpfiles fc4.tmp fc4.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o fc4.tmp --omit-header --no-location ${top_srcdir}/tests/format-c-4-prg.c -test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fc4.tmp > fc4.pot -test $? = 0 || { rm -fr $tmpfiles; exit 1; } +${XGETTEXT} -o fc4.tmp --omit-header --no-location "$abs_srcdir"/format-c-4-prg.c || exit 1 +LC_ALL=C tr -d '\r' < fc4.tmp > fc4.pot || exit 1 -tmpfiles="$tmpfiles fc4.ok" cat < fc4.ok #, c-format msgid "father of % child" @@ -24,7 +18,6 @@ EOF : ${DIFF=diff} ${DIFF} fc4.ok fc4.pot || exit 1 -tmpfiles="$tmpfiles fc4-de.po" cat < fc4-de.po #, c-format msgid "father of % child" @@ -33,7 +26,6 @@ msgstr[0] "Vater eines Kindes" msgstr[1] "Vater von % Kindern" EOF -tmpfiles="$tmpfiles fc4-dir" test -d fc4-dir || mkdir fc4-dir test -d fc4-dir/de || mkdir fc4-dir/de test -d fc4-dir/de/LC_MESSAGES || mkdir fc4-dir/de/LC_MESSAGES @@ -41,19 +33,14 @@ test -d fc4-dir/de/LC_MESSAGES || mkdir fc4-dir/de/LC_MESSAGES : ${MSGFMT=msgfmt} ${MSGFMT} -o fc4-dir/de/LC_MESSAGES/fc4.mo fc4-de.po -tmpfiles="$tmpfiles fc4-de.po.tmp fc4-de.po.un" : ${MSGUNFMT=msgunfmt} -${MSGUNFMT} -o fc4-de.po.tmp fc4-dir/de/LC_MESSAGES/fc4.mo -test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fc4-de.po.tmp > fc4-de.po.un -test $? = 0 || { rm -fr $tmpfiles; exit 1; } +${MSGUNFMT} -o fc4-de.po.tmp fc4-dir/de/LC_MESSAGES/fc4.mo || exit 1 +LC_ALL=C tr -d '\r' < fc4-de.po.tmp > fc4-de.po.un || exit 1 : ${DIFF=diff} ${DIFF} fc4-de.po fc4-de.po.un || exit 1 -LANGUAGE= ./fc4 de_DE +LANGUAGE= ../fc4 de_DE result=$? -rm -fr $tmpfiles - exit $result