]> git.ipfire.org Git - thirdparty/git.git/blob - t/t0205-gettext-poison.sh
i18n: add infrastructure for translating Git with gettext
[thirdparty/git.git] / t / t0205-gettext-poison.sh
1 #!/bin/sh
2 #
3 # Copyright (c) 2010 Ævar Arnfjörð Bjarmason
4 #
5
6 test_description='Gettext Shell poison'
7
8 . ./lib-gettext.sh
9
10 test_expect_success GETTEXT_POISON "sanity: \$GIT_INTERNAL_GETTEXT_SH_SCHEME is set (to $GIT_INTERNAL_GETTEXT_SH_SCHEME)" '
11 test -n "$GIT_INTERNAL_GETTEXT_SH_SCHEME"
12 '
13
14 test_expect_success GETTEXT_POISON 'sanity: $GIT_INTERNAL_GETTEXT_SH_SCHEME" is poison' '
15 test "$GIT_INTERNAL_GETTEXT_SH_SCHEME" = "poison"
16 '
17
18 test_expect_success GETTEXT_POISON 'gettext: our gettext() fallback has poison semantics' '
19 printf "# GETTEXT POISON #" >expect &&
20 gettext "test" >actual &&
21 test_cmp expect actual &&
22 printf "# GETTEXT POISON #" >expect &&
23 gettext "test more words" >actual &&
24 test_cmp expect actual
25 '
26
27 test_expect_success GETTEXT_POISON 'eval_gettext: our eval_gettext() fallback has poison semantics' '
28 printf "# GETTEXT POISON #" >expect &&
29 eval_gettext "test" >actual &&
30 test_cmp expect actual &&
31 printf "# GETTEXT POISON #" >expect &&
32 eval_gettext "test more words" >actual &&
33 test_cmp expect actual
34 '
35
36 test_done