git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
b66d34c6f2bceb6eb5da61773052c74b50c071ea blob 1187 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 
#!/bin/sh
#
# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
#

test_description='Gettext Shell poison'

GIT_TEST_GETTEXT_POISON=true
export GIT_TEST_GETTEXT_POISON
. ./lib-gettext.sh

test_expect_success 'sanity: $GIT_INTERNAL_GETTEXT_SH_SCHEME" is poison' '
    test "$GIT_INTERNAL_GETTEXT_SH_SCHEME" = "poison"
'

test_expect_success 'gettext: our gettext() fallback has poison semantics' '
    printf "# GETTEXT POISON #" >expect &&
    gettext "test" >actual &&
    test_cmp expect actual &&
    printf "# GETTEXT POISON #" >expect &&
    gettext "test more words" >actual &&
    test_cmp expect actual
'

test_expect_success 'eval_gettext: our eval_gettext() fallback has poison semantics' '
    printf "# GETTEXT POISON #" >expect &&
    eval_gettext "test" >actual &&
    test_cmp expect actual &&
    printf "# GETTEXT POISON #" >expect &&
    eval_gettext "test more words" >actual &&
    test_cmp expect actual
'

test_expect_success "gettext: invalid GIT_TEST_GETTEXT_POISON value doesn't infinitely loop" "
	test_must_fail env GIT_TEST_GETTEXT_POISON=xyz git version 2>error &&
	grep \"fatal: bad boolean config value 'xyz' for 'GIT_TEST_GETTEXT_POISON'\" error
"

test_done
debug log:

solving b66d34c6f2bc ...
found b66d34c6f2bc in https://public-inbox.org/git/pull.841.v2.git.git.1612833909210.gitgitgadget@gmail.com/
found f9fa16ad8363 in git.git.git
preparing index
index prepared:
100755 f9fa16ad8363a9e1c8611f37b5945f43ee2053c9	t/t0205-gettext-poison.sh

applying [1/1] https://public-inbox.org/git/pull.841.v2.git.git.1612833909210.gitgitgadget@gmail.com/
diff --git a/t/t0205-gettext-poison.sh b/t/t0205-gettext-poison.sh
index f9fa16ad8363..b66d34c6f2bc 100755

Checking patch t/t0205-gettext-poison.sh...
Applied patch t/t0205-gettext-poison.sh cleanly.

index at:
100755 b66d34c6f2bceb6eb5da61773052c74b50c071ea	t/t0205-gettext-poison.sh

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).