Skip to content

Commit 05f91df

Browse files
committed
Merge branch 'jc/test-allow-sed-with-ere'
Adjust test-lint to allow "sed -E" to use ERE in the patterns. * jc/test-allow-sed-with-ere: t: allow use of "sed -E"
2 parents 859132e + be430f4 commit 05f91df

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

t/check-non-portable-shell.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ sub err {
3636

3737
$_ = $line;
3838
/\bcp\s+-a/ and err 'cp -a is not portable';
39-
/\bsed\s+-[^efn]\s+/ and err 'sed option not portable (use only -n, -e, -f)';
39+
/\bsed\s+-[^Eefn]\s+/ and err 'sed option not portable (use only -E, -n, -e, -f)';
4040
/\becho\s+-[neE]/ and err 'echo with option is not portable (use printf)';
4141
/^\s*declare\s+/ and err 'arrays/declare not portable';
4242
/^\s*[^#]\s*which\s/ and err 'which is not portable (use type)';

t/t6030-bisect-porcelain.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ test_expect_success 'git bisect run: negative exit code' "
402402
git bisect good $HASH1 &&
403403
git bisect bad $HASH4 &&
404404
! git bisect run ./fail.sh 2>err &&
405-
sed -En 's/.*(bisect.*code) (-?[0-9]+) (from.*)/\1 -1 \3/p' err >actual &&
405+
sed -E -n 's/.*(bisect.*code) (-?[0-9]+) (from.*)/\1 -1 \3/p' err >actual &&
406406
test_cmp expect actual
407407
"
408408

0 commit comments

Comments
 (0)