diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-06-21 11:18:54 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-21 11:18:54 -0700 |
commit | e0ae1e6f4d53c68bd219385f6f309c033d0fc673 (patch) | |
tree | db8496da50b27acd1b413c371ef30528ebeae643 /t/t7006-pager.sh | |
parent | 993297717341ef7613ce21d34a9a6b475ed1a67b (diff) | |
download | git-e0ae1e6f4d53c68bd219385f6f309c033d0fc673.tar.gz |
tests: remove unnecessary '^' from 'expr' regular expression
As Brandon noticed, a regular expression match given to 'expr' is already
anchored at the beginning. Some versions of expr even complain about this.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7006-pager.sh')
-rwxr-xr-x | t/t7006-pager.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh index 3bc7a2a796..0f6b367832 100755 --- a/t/t7006-pager.sh +++ b/t/t7006-pager.sh @@ -109,7 +109,7 @@ test_expect_success TTY 'no pager with --no-pager' ' # for the first color; the text "commit" comes later. colorful() { read firstline <$1 - ! expr "$firstline" : "^[a-zA-Z]" >/dev/null + ! expr "$firstline" : "[a-zA-Z]" >/dev/null } test_expect_success 'tests can detect color' ' @@ -167,7 +167,7 @@ test_expect_success 'determine default pager' ' test -n "$less" ' -if expr "$less" : '^[a-z][a-z]*$' >/dev/null && test_have_prereq TTY +if expr "$less" : '[a-z][a-z]*$' >/dev/null && test_have_prereq TTY then test_set_prereq SIMPLEPAGER fi |