2 # test that the empty file means no pattern
3 # and an empty pattern means match all.
9 for options in '-E' '-E -w' '-F -x' '-G -w -x'; do
11 # should return 0 found a match
12 echo "" | ${GREP} $options -e '' > /dev/null 2>&1
13 if test $? -ne 0 ; then
14 echo "Status: Wrong status code, test \#1 failed ($options)"
18 # should return 1 found no match
19 echo "abcd" | ${GREP} $options -f /dev/null > /dev/null 2>&1
20 if test $? -ne 1 ; then
21 echo "Status: Wrong status code, test \#2 failed ($options)"
25 # should return 0 found a match
26 echo "abcd" | ${GREP} $options -f /dev/null -e "abcd" > /dev/null 2>&1
27 if test $? -ne 0 ; then
28 echo "Status: Wrong status code, test \#3 failed ($options)"