Skip to content

Commit

Permalink
(testsuite) Check for grep and ls invoked without "command", see README
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Jan 6, 2014
1 parent a2e2f19 commit d98e56f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/runLint
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

gitgrep()
{
local out=$(git grep -I -E -n "$1" | \
local out=$(git grep -I -P -n "$1" | \
grep -E '^(bash_completion|completions/|test/)' | \
grep -Fv 'test/runLint')
if [ -n "$out" ] ; then
Expand Down Expand Up @@ -40,3 +40,6 @@ gitgrep $cmdstart'[ef]grep\b' \

# TODO: $ in sed subexpression used as an anchor (POSIX BRE optional, not in
# Solaris/FreeBSD)

gitgrep '(?<!command)'$cmdstart'(grep|ls)(\s|$)' \
'invoke grep and ls with "command" prefix, e.g. "command grep"'

0 comments on commit d98e56f

Please sign in to comment.