1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 19:52:20 +00:00

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)
This commit is contained in:
Martijn Dekker 2020-05-21 01:16:48 +02:00
parent e999f6b169
commit c1dae413d2

View file

@ -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