From: Bruno Haible Date: Tue, 18 Jan 2005 11:43:47 +0000 (+0000) Subject: Elementary test for the xgettext Scheme backend. X-Git-Tag: v0.14.2~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f605d364a88e64057ea8ba66ed3d03aa2f8b59fe;p=thirdparty%2Fgettext.git Elementary test for the xgettext Scheme backend. --- diff --git a/gettext-tools/tests/xgettext-scheme-1 b/gettext-tools/tests/xgettext-scheme-1 new file mode 100755 index 000000000..4bb2fe784 --- /dev/null +++ b/gettext-tools/tests/xgettext-scheme-1 @@ -0,0 +1,44 @@ +#!/bin/sh + +# Test Scheme support: --add-comments option. + +tmpfiles="" +trap 'rm -fr $tmpfiles' 1 2 3 15 + +tmpfiles="$tmpfiles xg-sc-1.scm" +cat < xg-sc-1.scm +; This comment will not be extracted. +(display (_ "help")) +;; TRANSLATORS: This is an extracted comment. +(display (_ "me")) +#! Not extracted either. +!# +(display (_ "The Fabulous Four")) +EOF + +tmpfiles="$tmpfiles xg-sc-1.po" +: ${XGETTEXT=xgettext} +${XGETTEXT} -k_ --omit-header --no-location --add-comments=TRANSLATORS: \ + xg-sc-1.scm -d xg-sc-1 +test $? = 0 || { rm -fr $tmpfiles; exit 1; } + +tmpfiles="$tmpfiles xg-sc-1.ok" +cat < xg-sc-1.ok +msgid "help" +msgstr "" + +#. TRANSLATORS: This is an extracted comment. +msgid "me" +msgstr "" + +msgid "The Fabulous Four" +msgstr "" +EOF + +: ${DIFF=diff} +${DIFF} xg-sc-1.ok xg-sc-1.po +result=$? + +rm -fr $tmpfiles + +exit $result