Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 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 | . ./lib-gettext.sh |
| 9 | |
| 10 | test_expect_success 'git show a ISO-8859-1 commit under C locale' ' |
Johannes Schindelin | 8a7f8be | 2017-05-09 14:54:24 +0200 | [diff] [blame] | 11 | . "$TEST_DIRECTORY"/t3901/8859-1.txt && |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 12 | test_commit "iso-c-commit" iso-under-c && |
| 13 | git show >out 2>err && |
SZEDER Gábor | ec10b01 | 2018-08-19 23:57:22 +0200 | [diff] [blame] | 14 | test_must_be_empty err && |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 15 | grep -q "iso-c-commit" out |
| 16 | ' |
| 17 | |
| 18 | test_expect_success GETTEXT_LOCALE 'git show a ISO-8859-1 commit under a UTF-8 locale' ' |
Johannes Schindelin | 8a7f8be | 2017-05-09 14:54:24 +0200 | [diff] [blame] | 19 | . "$TEST_DIRECTORY"/t3901/8859-1.txt && |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 20 | test_commit "iso-utf8-commit" iso-under-utf8 && |
| 21 | LANGUAGE=is LC_ALL="$is_IS_locale" git show >out 2>err && |
SZEDER Gábor | ec10b01 | 2018-08-19 23:57:22 +0200 | [diff] [blame] | 22 | test_must_be_empty err && |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 23 | grep -q "iso-utf8-commit" out |
| 24 | ' |
| 25 | |
| 26 | test_done |