2 # Test for POSIX.2 options for grep
4 # grep -E -f pattern_file file
5 # grep -F -f pattern_file file
6 # grep -G -f pattern_file file
20 echo "miles" | ${GREP} -i -E -f patfile > /dev/null 2>&1
21 if test $? -ne 0 ; then
22 echo "File_pattern: Wrong status code, test \#1 failed"
27 echo "GNU" | ${GREP} -G -f patfile > /dev/null 2>&1
28 if test $? -ne 0 ; then
29 echo "File_pattern: Wrong status code, test \#2 failed"
33 # checking for no match
34 echo "ridar" | ${GREP} -F -f patfile > /dev/null 2>&1
35 if test $? -ne 1 ; then
36 echo "File_pattern: Wrong status code, test \#3 failed"
43 # empty pattern : every match
44 echo "abbcd" | ${GREP} -F -f patfile > /dev/null 2>&1
45 if test $? -ne 0 ; then
46 echo "File_pattern: Wrong status code, test \#4 failed"
52 # null pattern : no match
53 echo "abbcd" | ${GREP} -F -f patfile > /dev/null 2>&1
54 if test $? -ne 1 ; then
55 echo "File_pattern: Wrong status code, test \#5 failed"