X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=tests%2Finit.cfg;fp=tests%2Finit.cfg;h=5adfc9b357a134dcadd90de07838a535f84739fa;hb=dc84183747ce1703eb99685b5dbde1f65a143c06;hp=0000000000000000000000000000000000000000;hpb=a2016c1de6e4884f6c8ed5cc498f3bf821c25ca4;p=debian%2Fgzip diff --git a/tests/init.cfg b/tests/init.cfg new file mode 100644 index 0000000..5adfc9b --- /dev/null +++ b/tests/init.cfg @@ -0,0 +1,20 @@ +# This file is sourced by init.sh, *before* its initialization. + +# This goes hand in hand with the "exec 9>&2;" in Makefile.am's +# TESTS_ENVIRONMENT definition. +stderr_fileno_=9 + +require_POSIX_grep_() +{ + # Ensure that grep's -f and -E options works. + # On Solaris 5.11, "grep -f" prints this: + # grep: illegal option -- f + # Usage: grep -hblcnsviw pattern file . . . + # Similar for grep -E. + + : | grep -f /dev/null + test $? = 1 || skip_ 'your grep lacks support for -f -' + + grep -E foo /dev/null + test $? = 1 || skip_ 'your grep lacks support for -E' +}