summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-07-19 17:43:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-19 17:43:13 (GMT)
commit98aa2eabf047d673447b72f4b4ac6cae6aae3a16 (patch)
treee335de1a6debe366babe9ebb11161b4b4e637afb /t
parent871ed7842c2cc6c73aef45e7e46dc658a8ddf973 (diff)
parent9968ffff0d09b4925f339cceafb5f7e7cd78fb02 (diff)
downloadgit-98aa2eabf047d673447b72f4b4ac6cae6aae3a16.zip
git-98aa2eabf047d673447b72f4b4ac6cae6aae3a16.tar.gz
git-98aa2eabf047d673447b72f4b4ac6cae6aae3a16.tar.bz2
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
Diffstat (limited to 't')
-rwxr-xr-xt/check-non-portable-shell.pl1
-rwxr-xr-xt/t9902-completion.sh2
2 files changed, 2 insertions, 1 deletions
diff --git a/t/check-non-portable-shell.pl b/t/check-non-portable-shell.pl
index 8b5a71d..45971f4 100755
--- a/t/check-non-portable-shell.pl
+++ b/t/check-non-portable-shell.pl
@@ -21,6 +21,7 @@ while (<>) {
/^\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;
}
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index 6d9d141..a71d8b4 100755
--- a/t/t9902-completion.sh
+++ b/t/t9902-completion.sh
@@ -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
}