clone_submodule: avoid using `access()` on directories
[git.git] / t / t0203-gettext-setlocale-sanity.sh
blob86cff324ff181110cf1ef8a44af6c4295b7f5d40
1 #!/bin/sh
3 # Copyright (c) 2010 Ævar Arnfjörð Bjarmason
6 test_description="The Git C functions aren't broken by setlocale(3)"
8 TEST_PASSES_SANITIZE_LEAK=true
9 . ./lib-gettext.sh
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
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
27 test_done