From: Carlo Marcelo Arenas Belón Date: Sat, 1 Dec 2018 17:36:45 +0000 (-0800) Subject: tests: add lint for non portable cp -a X-Git-Tag: v2.21.0-rc0~116^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/82cbc8cde25859027aa013568a7040b5a63707d2?ds=inline;hp=--cc tests: add lint for non portable cp -a cp -a, while a common flag isn't in POSIX and will therefore fail on systems that don't have GNUish tools (like OpenBSD, AIX or Solaris) Signed-off-by: Carlo Marcelo Arenas Belón Signed-off-by: Junio C Hamano --- 82cbc8cde25859027aa013568a7040b5a63707d2 diff --git a/t/check-non-portable-shell.pl b/t/check-non-portable-shell.pl index b45bdac688..8037eef777 100755 --- a/t/check-non-portable-shell.pl +++ b/t/check-non-portable-shell.pl @@ -35,6 +35,7 @@ sub err { chomp; } + /\bcp\s+-a/ and err 'cp -a is not portable'; /\bsed\s+-i/ and err 'sed -i is not portable'; /\becho\s+-[neE]/ and err 'echo with option is not portable (use printf)'; /^\s*declare\s+/ and err 'arrays/declare not portable';