Skip to content

Commit ecd3e2f

Browse files
committed
Merge branch 'jc/maint-test-portability' into 'jc/test-portability'
* jc/maint-test-portability: t4014: fix arguments to grep t9502: do not assume GNU tar t0200: "locale" may not exist
2 parents 252f922 + 27f6342 commit ecd3e2f

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

t/lib-gettext.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ export GIT_TEXTDOMAINDIR GIT_PO_PATH
1414
if test_have_prereq GETTEXT && ! test_have_prereq GETTEXT_POISON
1515
then
1616
# is_IS.UTF-8 on Solaris and FreeBSD, is_IS.utf8 on Debian
17-
is_IS_locale=$(locale -a | sed -n '/^is_IS\.[uU][tT][fF]-*8$/{
17+
is_IS_locale=$(locale -a 2>/dev/null |
18+
sed -n '/^is_IS\.[uU][tT][fF]-*8$/{
1819
p
1920
q
2021
}')
2122
# is_IS.ISO8859-1 on Solaris and FreeBSD, is_IS.iso88591 on Debian
22-
is_IS_iso_locale=$(locale -a | sed -n '/^is_IS\.[iI][sS][oO]8859-*1$/{
23+
is_IS_iso_locale=$(locale -a 2>/dev/null |
24+
sed -n '/^is_IS\.[iI][sS][oO]8859-*1$/{
2325
p
2426
q
2527
}')

t/t4014-format-patch.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ test_expect_failure 'additional command line cc (rfc822)' '
155155
git config --replace-all format.headers "Cc: R E Cipient <[email protected]>" &&
156156
git format-patch --cc="S. E. Cipient <[email protected]>" --stdout master..side | sed -e "/^\$/q" >patch5 &&
157157
grep "^Cc: R E Cipient <[email protected]>,\$" patch5 &&
158-
grep "^ *"S. E. Cipient" <[email protected]>\$" patch5
158+
grep "^ *\"S. E. Cipient\" <[email protected]>\$" patch5
159159
'
160160

161161
test_expect_success 'command line headers' '
@@ -183,7 +183,7 @@ test_expect_success 'command line To: header (ascii)' '
183183
test_expect_failure 'command line To: header (rfc822)' '
184184
185185
git format-patch --to="R. E. Cipient <[email protected]>" --stdout master..side | sed -e "/^\$/q" >patch8 &&
186-
grep "^To: "R. E. Cipient" <[email protected]>\$" patch8
186+
grep "^To: \"R. E. Cipient\" <[email protected]>\$" patch8
187187
'
188188

189189
test_expect_failure 'command line To: header (rfc2047)' '
@@ -203,7 +203,7 @@ test_expect_failure 'configuration To: header (rfc822)' '
203203
204204
git config format.to "R. E. Cipient <[email protected]>" &&
205205
git format-patch --stdout master..side | sed -e "/^\$/q" >patch9 &&
206-
grep "^To: "R. E. Cipient" <[email protected]>\$" patch9
206+
grep "^To: \"R. E. Cipient\" <[email protected]>\$" patch9
207207
'
208208

209209
test_expect_failure 'configuration To: header (rfc2047)' '

t/t9502-gitweb-standalone-parse-output.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ check_snapshot () {
4040
echo "basename=$basename"
4141
grep "filename=.*$basename.tar" gitweb.headers >/dev/null 2>&1 &&
4242
"$TAR" tf gitweb.body >file_list &&
43-
! grep -v "^$prefix/" file_list
43+
! grep -v -e "^$prefix$" -e "^$prefix/" -e "^pax_global_header$" file_list
4444
}
4545

4646
test_expect_success setup '

0 commit comments

Comments
 (0)