Skip to content

Commit 2e582df

Browse files
sunshinecogitster
authored andcommitted
t7508: avoid non-portable sed expression
2556b99 (status: disable display of '#' comment prefix by default; 2013-09-06) introduced tests which fail on Mac OS X due to unportable use of \t (for TAB) in a sed expression. POSIX [1][2] also disallows it. Fix this. [1]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html#tag_20_116_13_02 [2]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_02 Signed-off-by: Eric Sunshine <[email protected]> Acked-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2f0f7f1 commit 2e582df

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/t7508-status.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ test_expect_success 'status (1)' '
6161
'
6262

6363
strip_comments () {
64-
sed "s/^\# //; s/^\#$//; s/^#\t/\t/" <"$1" >"$1".tmp &&
64+
tab=' '
65+
sed "s/^\# //; s/^\#$//; s/^#$tab/$tab/" <"$1" >"$1".tmp &&
6566
rm "$1" && mv "$1".tmp "$1"
6667
}
6768

0 commit comments

Comments
 (0)