diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-12-19 16:06:41 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-19 16:06:41 -0800 |
commit | 2dccad3c6f9df2b1eea7eb5617e2748a7f2daa40 (patch) | |
tree | 3753154d3da34ff50e82a667a75ad56437d4d12f /t/t0203-gettext-setlocale-sanity.sh | |
parent | 85878dd0c929dde5d91411b57ef9f2d696cbc7d8 (diff) | |
parent | 5e9637c629702e3d41ad01d95956d1835d7338e0 (diff) | |
download | git-2dccad3c6f9df2b1eea7eb5617e2748a7f2daa40.tar.gz |
Merge branch 'ab/enable-i18n'
* ab/enable-i18n:
i18n: add infrastructure for translating Git with gettext
Conflicts:
Makefile
Diffstat (limited to 't/t0203-gettext-setlocale-sanity.sh')
-rwxr-xr-x | t/t0203-gettext-setlocale-sanity.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/t/t0203-gettext-setlocale-sanity.sh b/t/t0203-gettext-setlocale-sanity.sh new file mode 100755 index 0000000000..a212460081 --- /dev/null +++ b/t/t0203-gettext-setlocale-sanity.sh @@ -0,0 +1,26 @@ +#!/bin/sh +# +# Copyright (c) 2010 Ævar Arnfjörð Bjarmason +# + +test_description="The Git C functions aren't broken by setlocale(3)" + +. ./lib-gettext.sh + +test_expect_success 'git show a ISO-8859-1 commit under C locale' ' + . "$TEST_DIRECTORY"/t3901-8859-1.txt && + test_commit "iso-c-commit" iso-under-c && + git show >out 2>err && + ! test -s err && + grep -q "iso-c-commit" out +' + +test_expect_success GETTEXT_LOCALE 'git show a ISO-8859-1 commit under a UTF-8 locale' ' + . "$TEST_DIRECTORY"/t3901-8859-1.txt && + test_commit "iso-utf8-commit" iso-under-utf8 && + LANGUAGE=is LC_ALL="$is_IS_locale" git show >out 2>err && + ! test -s err && + grep -q "iso-utf8-commit" out +' + +test_done |