Skip to content

Commit

Permalink
Merge branch 'tr/test-lint-no-export-assignment-in-shell'
Browse files Browse the repository at this point in the history
* tr/test-lint-no-export-assignment-in-shell:
  test-lint: detect 'export FOO=bar'
  t9902: fix 'test A == B' to use = operator
  • Loading branch information
Junio C Hamano committed Jul 12, 2013
2 parents 624ec4f + 9968fff commit 533a05f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions t/check-non-portable-shell.pl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ sub err {
/^\s*declare\s+/ and err 'arrays/declare not portable';
/^\s*[^#]\s*which\s/ and err 'which is not portable (please use type)';
/test\s+[^=]*==/ and err '"test a == b" is not portable (please use =)';
/^\s*export\s+[^=]*=/ and err '"export FOO=bar" is not portable (please use FOO=bar && export FOO)';
# this resets our $. for each file
close ARGV if eof;
}
Expand Down
2 changes: 1 addition & 1 deletion t/t9902-completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ run_completion ()
local -a COMPREPLY _words
local _cword
_words=( $1 )
test "${1: -1}" == ' ' && _words+=('')
test "${1: -1}" = ' ' && _words+=('')
(( _cword = ${#_words[@]} - 1 ))
__git_wrap__git_main && print_comp
}
Expand Down

0 comments on commit 533a05f

Please sign in to comment.