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