Skip to content

Commit c2ed29b

Browse files
drafnelgitster
authored andcommitted
test-lib.sh/test_decode_color(): use octal not hex in awk script
POSIX awk seems to explicitly not support hexadecimal escape sequences. From http://pubs.opengroup.org/onlinepubs/009695399/: Regular expressions in awk have been extended somewhat... One sequence that is not supported is hexadecimal value escapes beginning with '\x'. This affects the awk on IRIX 6.5, and causes t4015.56 to fail. Use octal instead. Signed-off-by: Brandon Casey <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 77e5726 commit c2ed29b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/test-lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ test_decode_color () {
260260
if (n == 47) return "BWHITE";
261261
}
262262
{
263-
while (match($0, /\x1b\[[0-9;]*m/) != 0) {
263+
while (match($0, /\033\[[0-9;]*m/) != 0) {
264264
printf "%s<", substr($0, 1, RSTART-1);
265265
codes = substr($0, RSTART+2, RLENGTH-3);
266266
if (length(codes) == 0)

0 commit comments

Comments
 (0)