/[grep]/grep/tests/status.sh
ViewVC logotype

Diff of /grep/tests/status.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by kasal, Thu Jun 5 07:59:30 2003 UTC revision 1.9 by kasal, Fri Jan 7 10:39:02 2005 UTC
# Line 41  else Line 41  else
41                  failures=1                  failures=1
42          fi          fi
43    
44            # should return 2 file not found
45            echo "abcd" | ${GREP} -E -s 'abc' - MMMMMMMM.MMM > /dev/null 2>&1
46            if test $? -ne 2 ; then
47                    echo "Status: Wrong status code, test \#5 failed"
48                    failures=1
49            fi
50    
51          # should return 0 found a match          # should return 0 found a match
52          echo "abcd" | ${GREP} -E -q -s 'abc' MMMMMMMM.MMM - > /dev/null 2>&1          echo "abcd" | ${GREP} -E -q -s 'abc' MMMMMMMM.MMM - > /dev/null 2>&1
53          if test $? -ne 0 ; then          if test $? -ne 0 ; then
54                  echo "Status: Wrong status code, test \#5 failed"                  echo "Status: Wrong status code, test \#6 failed"
55                    failures=1
56            fi
57    
58            # should still return 0 found a match
59            echo "abcd" | ${GREP} -E -q 'abc' MMMMMMMM.MMM - > /dev/null 2>&1
60            if test $? -ne 0 ; then
61                    echo "Status: Wrong status code, test \#7 failed"
62                  failures=1                  failures=1
63          fi          fi
64  fi  fi

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26