Merge branch 'jn/grep-open' into next

* jn/grep-open:
  t/t7811-grep-open.sh: remove broken/redundant creation of fake "less" script
  t/t7811-grep-open.sh: ensure fake "less" is made executable
  t/lib-pager.sh: remove unnecessary '^' from 'expr' regular expression
This commit is contained in:
Junio C Hamano
2010-06-22 10:06:28 -07:00
2 changed files with 3 additions and 7 deletions

View File

@@ -9,7 +9,7 @@ test_expect_success 'determine default pager' '
test -n "$less"
'
if expr "$less" : '^[a-z][a-z]*$' >/dev/null
if expr "$less" : '[a-z][a-z]*$' >/dev/null
then
test_set_prereq SIMPLEPAGER
fi

View File

@@ -84,10 +84,11 @@ test_expect_success 'git grep -O --no-index' '
'
test_expect_success 'setup: fake "less"' '
cat >less <<-\EOF
cat >less <<-\EOF &&
#!/bin/sh
printf "%s\n" "$@" >actual
EOF
chmod +x less
'
test_expect_success 'git grep -O jumps to line in less' '
@@ -108,11 +109,6 @@ test_expect_success 'git grep -O jumps to line in less' '
test_expect_success 'modified file' '
rm -f actual &&
cat >less <<-\EOF &&
#!/bin/sh
printf "%s\n" "$@" >actual
EOF
chmod +x $less &&
cat >expect <<-\EOF &&
+/*enum grep_pat_token
grep.h