Skip to content

Commit 98aa2ea

Browse files
committed
Merge branch 'tr/test-lint-no-export-assignment-in-shell' into maint
* tr/test-lint-no-export-assignment-in-shell: test-lint: detect 'export FOO=bar' t9902: fix 'test A == B' to use = operator
2 parents 871ed78 + 9968fff commit 98aa2ea

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

t/check-non-portable-shell.pl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ sub err {
2121
/^\s*declare\s+/ and err 'arrays/declare not portable';
2222
/^\s*[^#]\s*which\s/ and err 'which is not portable (please use type)';
2323
/test\s+[^=]*==/ and err '"test a == b" is not portable (please use =)';
24+
/^\s*export\s+[^=]*=/ and err '"export FOO=bar" is not portable (please use FOO=bar && export FOO)';
2425
# this resets our $. for each file
2526
close ARGV if eof;
2627
}

t/t9902-completion.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ run_completion ()
6969
local -a COMPREPLY _words
7070
local _cword
7171
_words=( $1 )
72-
test "${1: -1}" == ' ' && _words+=('')
72+
test "${1: -1}" = ' ' && _words+=('')
7373
(( _cword = ${#_words[@]} - 1 ))
7474
__git_wrap__git_main && print_comp
7575
}

0 commit comments

Comments
 (0)