According to Jim Meyering on 1/14/2010 1:08 AM: > Think of a set-up function that (when $EXEEXT is nonempty) > iterates through the *.$EXEEXT executables in a specified directory... > > create_exe_shim_functions () > { > case $EXEEXT in > '') return 0 ;; > .exe) ;; > *) echo "$0: unexpected value of $EXEEXT" 1>&2; return 1 ;; > esac
So we still have to pass EXEEXT through TESTS_ENVIRONMENT in modules/*-tests for any test that uses a .sh file. But other than that, all of our tests-*.sh no longer need to worry about EXEEXT, once they've been converted to use init.sh. I like it. Or go one step further, do the search for *.exe without regards to $EXEEXT, skipping this case block, and simplifying modules/*-tests. > # Remove the .$EXEEXT suffix. > base=${file%.$EXEEXT} This is not portable to Solaris /bin/sh. Unless we take the same measures as coreutils to ensure a (mostly) POSIX-compliant shell, I think we are better off using only features supported by common /bin/sh. -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net
signature.asc
Description: OpenPGP digital signature