summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-07-12 12:04:16 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-07-12 12:04:16 -0700
commit533a05f63ac110c17d4b3d6f6472b504a9ec8f92 (patch)
treed5385c09cc5449c1707f436b689e792eb470a4d2 /t
parentMerge branch 'rr/name-rev-stdin-doc' (diff)
parenttest-lint: detect 'export FOO=bar' (diff)
downloadtgif-533a05f63ac110c17d4b3d6f6472b504a9ec8f92.tar.xz
Merge branch 'tr/test-lint-no-export-assignment-in-shell'
* 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 8b5a71dc05..45971f43b7 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 d9e3103af5..272a071e85 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
}