From: Junio C Hamano Date: Thu, 7 Feb 2019 06:05:24 +0000 (-0800) Subject: Merge branch 'tb/test-lint-sed-options' X-Git-Tag: v2.21.0-rc0~19 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/d8d62e61353c7e34006cc5714f07f507256612df Merge branch 'tb/test-lint-sed-options' The test lint learned to catch non-portable "sed" options. * tb/test-lint-sed-options: test-lint: only use only sed [-n] [-e command] [-f command_file] --- d8d62e61353c7e34006cc5714f07f507256612df diff --cc t/check-non-portable-shell.pl index 8037eef777,f0edcf8eb0..166d64d4a2 --- a/t/check-non-portable-shell.pl +++ b/t/check-non-portable-shell.pl @@@ -35,8 -35,7 +35,8 @@@ while (<>) chomp; } + /\bcp\s+-a/ and err 'cp -a is not portable'; - /\bsed\s+-i/ and err 'sed -i is not portable'; + /\bsed\s+-[^efn]\s+/ and err 'sed option not portable (use only -n, -e, -f)'; /\becho\s+-[neE]/ and err 'echo with option is not portable (use printf)'; /^\s*declare\s+/ and err 'arrays/declare not portable'; /^\s*[^#]\s*which\s/ and err 'which is not portable (use type)';