File: t0203-gettext-setlocale-sanity.sh

package info (click to toggle)
git 1%3A2.50.1-0.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 61,696 kB
  • sloc: ansic: 302,907; sh: 260,696; perl: 27,874; tcl: 22,303; makefile: 4,280; python: 3,442; javascript: 772; csh: 45; lisp: 12
file content (26 lines) | stat: -rwxr-xr-x 696 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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_must_be_empty 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_must_be_empty err &&
	grep -q "iso-utf8-commit" out
'

test_done