Merge branch 'jc/maint-test-portability' into maint

* jc/maint-test-portability:
  t4014: fix arguments to grep
  t9502: do not assume GNU tar
  t0200: "locale" may not exist
This commit is contained in:
Junio C Hamano 2013-01-08 11:16:52 -08:00
Родитель 831d57a0f5 27f6342f61
Коммит ee18de62b5
3 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -14,12 +14,14 @@ export GIT_TEXTDOMAINDIR GIT_PO_PATH
if test_have_prereq GETTEXT && ! test_have_prereq GETTEXT_POISON
then
# is_IS.UTF-8 on Solaris and FreeBSD, is_IS.utf8 on Debian
is_IS_locale=$(locale -a | sed -n '/^is_IS\.[uU][tT][fF]-*8$/{
is_IS_locale=$(locale -a 2>/dev/null |
sed -n '/^is_IS\.[uU][tT][fF]-*8$/{
p
q
}')
# is_IS.ISO8859-1 on Solaris and FreeBSD, is_IS.iso88591 on Debian
is_IS_iso_locale=$(locale -a | sed -n '/^is_IS\.[iI][sS][oO]8859-*1$/{
is_IS_iso_locale=$(locale -a 2>/dev/null |
sed -n '/^is_IS\.[iI][sS][oO]8859-*1$/{
p
q
}')

Просмотреть файл

@ -155,7 +155,7 @@ test_expect_failure 'additional command line cc (rfc822)' '
git config --replace-all format.headers "Cc: R E Cipient <rcipient@example.com>" &&
git format-patch --cc="S. E. Cipient <scipient@example.com>" --stdout master..side | sed -e "/^\$/q" >patch5 &&
grep "^Cc: R E Cipient <rcipient@example.com>,\$" patch5 &&
grep "^ *"S. E. Cipient" <scipient@example.com>\$" patch5
grep "^ *\"S. E. Cipient\" <scipient@example.com>\$" patch5
'
test_expect_success 'command line headers' '
@ -183,7 +183,7 @@ test_expect_success 'command line To: header (ascii)' '
test_expect_failure 'command line To: header (rfc822)' '
git format-patch --to="R. E. Cipient <rcipient@example.com>" --stdout master..side | sed -e "/^\$/q" >patch8 &&
grep "^To: "R. E. Cipient" <rcipient@example.com>\$" patch8
grep "^To: \"R. E. Cipient\" <rcipient@example.com>\$" patch8
'
test_expect_failure 'command line To: header (rfc2047)' '
@ -203,7 +203,7 @@ test_expect_failure 'configuration To: header (rfc822)' '
git config format.to "R. E. Cipient <rcipient@example.com>" &&
git format-patch --stdout master..side | sed -e "/^\$/q" >patch9 &&
grep "^To: "R. E. Cipient" <rcipient@example.com>\$" patch9
grep "^To: \"R. E. Cipient\" <rcipient@example.com>\$" patch9
'
test_expect_failure 'configuration To: header (rfc2047)' '

Просмотреть файл

@ -40,7 +40,7 @@ check_snapshot () {
echo "basename=$basename"
grep "filename=.*$basename.tar" gitweb.headers >/dev/null 2>&1 &&
"$TAR" tf gitweb.body >file_list &&
! grep -v "^$prefix/" file_list
! grep -v -e "^$prefix$" -e "^$prefix/" -e "^pax_global_header$" file_list
}
test_expect_success setup '