]> git.ipfire.org Git - thirdparty/git.git/blob - t/t0203-gettext-setlocale-sanity.sh
Merge branch 'jk/clone-allow-bare-and-o-together'
[thirdparty/git.git] / t / t0203-gettext-setlocale-sanity.sh
1 #!/bin/sh
2 #
3 # Copyright (c) 2010 Ævar Arnfjörð Bjarmason
4 #
5
6 test_description="The Git C functions aren't broken by setlocale(3)"
7
8 TEST_PASSES_SANITIZE_LEAK=true
9 . ./lib-gettext.sh
10
11 test_expect_success 'git show a ISO-8859-1 commit under C locale' '
12 . "$TEST_DIRECTORY"/t3901/8859-1.txt &&
13 test_commit "iso-c-commit" iso-under-c &&
14 git show >out 2>err &&
15 test_must_be_empty err &&
16 grep -q "iso-c-commit" out
17 '
18
19 test_expect_success GETTEXT_LOCALE 'git show a ISO-8859-1 commit under a UTF-8 locale' '
20 . "$TEST_DIRECTORY"/t3901/8859-1.txt &&
21 test_commit "iso-utf8-commit" iso-under-utf8 &&
22 LANGUAGE=is LC_ALL="$is_IS_locale" git show >out 2>err &&
23 test_must_be_empty err &&
24 grep -q "iso-utf8-commit" out
25 '
26
27 test_done