From c1dae413d265f288866ac62ddda940e8678c31ee Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Thu, 21 May 2020 01:16:48 +0200 Subject: [PATCH] shtests: don't require specifying .sh extension for test script It was annoying me that I always had to type out the .sh in 'shtests builtins.sh', etc. to execute a specific regression test script. All the test scripts end in .sh, so this is superflous. src/cmd/ksh93/tests/shtests: - Add .sh to test script arguments if not already present. (cherry picked from commit d780e701fbf6f27b6e79f88542a3175bf5dd85e9) --- src/cmd/ksh93/tests/shtests | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cmd/ksh93/tests/shtests b/src/cmd/ksh93/tests/shtests index 654201047..c76027d4f 100755 --- a/src/cmd/ksh93/tests/shtests +++ b/src/cmd/ksh93/tests/shtests @@ -308,7 +308,8 @@ then if [[ -x $SHELL-g ]] fi typeset -A tests for i in ${*-*.sh} -do if [[ ! -r $i ]] +do [[ $i == *.sh ]] || i+='.sh' + if [[ ! -r $i ]] then echo $0: $i: not found >&2 continue fi