(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ <'Gettext support for Git'>)} spids: [13] ) ] ) (C {<.>} {<'./lib-gettext.sh'>}) (C {<test_expect_success>} { (DQ <'sanity: '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <'GIT_INTERNAL_GETTEXT_SH_SCHEME is set (to '> ($ Id.VSub_DollarName '$GIT_INTERNAL_GETTEXT_SH_SCHEME') <')'> ) } {(SQ <'\n'> <' test -n "$GIT_INTERNAL_GETTEXT_SH_SCHEME"\n'>)} ) (C {<test_expect_success>} {(SQ <'sanity: $TEXTDOMAIN is git'>)} {(SQ <'\n'> <' test $TEXTDOMAIN = "git"\n'>)} ) (C {<test_expect_success>} {(SQ <'xgettext sanity: Perl _() strings are not extracted'>)} {(SQ <'\n'> <' ! grep "A Perl string xgettext will not get" "$GIT_PO_PATH"/is.po\n'>)} ) (C {<test_expect_success>} {(SQ <'xgettext sanity: Comment extraction with --add-comments'>)} { (SQ <'\n'> <' grep "TRANSLATORS: This is a test" "$TEST_DIRECTORY"/t0200/* | wc -l >expect &&\n'> <' grep "TRANSLATORS: This is a test" "$GIT_PO_PATH"/is.po | wc -l >actual &&\n'> <' test_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'xgettext sanity: Comment extraction with --add-comments stops at statements'>)} { (SQ <'\n'> <' ! grep "This is a phony" "$GIT_PO_PATH"/is.po &&\n'> <' ! grep "the above comment" "$GIT_PO_PATH"/is.po\n'> ) } ) (C {<test_expect_success>} {<GETTEXT>} {(SQ <'sanity: $TEXTDOMAINDIR exists without NO_GETTEXT=YesPlease'>)} { (SQ <'\n'> <' test -d "$TEXTDOMAINDIR" &&\n'> <' test "$TEXTDOMAINDIR" = "$GIT_TEXTDOMAINDIR"\n'> ) } ) (C {<test_expect_success>} {<GETTEXT>} {(SQ <'sanity: Icelandic locale was compiled'>)} {(SQ <'\n'> <' test -f "$TEXTDOMAINDIR/is/LC_MESSAGES/git.mo"\n'>)} ) (C {<test_expect_success>} {<GETTEXT_LOCALE>} {(SQ <'sanity: gettext("") metadata is OK'>)} { (SQ <'\n'> <' # Return value may be non-zero\n'> <' LANGUAGE=is LC_ALL="$is_IS_locale" gettext "" >zero-expect &&\n'> <' grep "Project-Id-Version: Git" zero-expect &&\n'> <' grep "Git Mailing List <git@vger.kernel.org>" zero-expect &&\n'> <' grep "Content-Type: text/plain; charset=UTF-8" zero-expect &&\n'> <' grep "Content-Transfer-Encoding: 8bit" zero-expect\n'> ) } ) (C {<test_expect_success>} {<GETTEXT_LOCALE>} {(SQ <'sanity: gettext(unknown) is passed through'>)} { (SQ <'\n'> <' printf "This is not a translation string" >expect &&\n'> <' gettext "This is not a translation string" >actual &&\n'> <' eval_gettext "This is not a translation string" >actual &&\n'> <' test_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {<GETTEXT_LOCALE>} {(SQ <'xgettext: C extraction of _() and N_() strings'>)} { (SQ <'\n'> <' printf "TILRAUN: C tilraunastrengur" >expect &&\n'> <' printf "\\n" >>expect &&\n'> <' printf "Sjá '> ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'git help SKIPUN'>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' til að sjá hjálp fyrir tiltekna skipun." >>expect &&\n'> <' LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A C test string" >actual &&\n'> <' printf "\\n" >>actual &&\n'> <' LANGUAGE=is LC_ALL="$is_IS_locale" gettext "See '> ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'git help COMMAND'>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' for more information on a specific command." >>actual &&\n'> <' test_cmp expect actual\n'>) } ) (C {<test_expect_success>} {<GETTEXT_LOCALE>} {(SQ <'xgettext: C extraction with %s'>)} { (SQ <'\n'> <' printf "TILRAUN: C tilraunastrengur %%s" >expect &&\n'> <' LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A C test string %s" >actual &&\n'> <' test_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {<GETTEXT_LOCALE>} {(SQ <'xgettext: Shell extraction'>)} { (SQ <'\n'> <' printf "TILRAUN: Skeljartilraunastrengur" >expect &&\n'> < ' LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A Shell test string" >actual &&\n' > <' test_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {<GETTEXT_LOCALE>} {(SQ <'xgettext: Shell extraction with $variable'>)} { (SQ <'\n'> < ' printf "TILRAUN: Skeljartilraunastrengur með breytunni a var i able" >x-expect &&\n' > < ' LANGUAGE=is LC_ALL="$is_IS_locale" variable="a var i able" eval_gettext "TEST: A Shell test \\$variable" >x-actual &&\n' > <' test_cmp x-expect x-actual\n'> ) } ) (C {<test_expect_success>} {<GETTEXT_LOCALE>} {(SQ <'xgettext: Perl extraction'>)} { (SQ <'\n'> <' printf "TILRAUN: Perl tilraunastrengur" >expect &&\n'> <' LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A Perl test string" >actual &&\n'> <' test_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {<GETTEXT_LOCALE>} {(SQ <'xgettext: Perl extraction with %s'>)} { (SQ <'\n'> <' printf "TILRAUN: Perl tilraunastrengur með breytunni %%s" >expect &&\n'> < ' LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A Perl test variable %s" >actual &&\n' > <' test_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {<GETTEXT_LOCALE>} {(SQ <'sanity: Some gettext("") data for real locale'>)} { (SQ <'\n'> <' LANGUAGE=is LC_ALL="$is_IS_locale" gettext "" >real-locale &&\n'> <' test -s real-locale\n'> ) } ) (C {<test_done>}) ] )