home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / GREP20 / TESTS / CHECK.SH < prev    next >
Linux/UNIX/POSIX Shell Script  |  1993-05-02  |  530b  |  25 lines

  1. #! /bin/sh
  2. # Regression test for GNU grep.
  3. # Usage: regress.sh [testdir]
  4.  
  5. testdir=${1-tests}
  6.  
  7. failures=0
  8.  
  9. # The Khadafy test is brought to you by Scott Anderson . . .
  10. ./grep -E -f $testdir/khadafy.regexp $testdir/khadafy.lines > khadafy.out
  11. if cmp $testdir/khadafy.lines khadafy.out
  12. then
  13.     :
  14. else
  15.     echo Khadafy test failed -- output left on khadafy.out
  16.     failures=1
  17. fi
  18.  
  19. # . . . and the following by Henry Spencer.
  20.  
  21. ${AWK-awk} -F: -f $testdir/scriptgen.awk $testdir/spencer.tests > tmp.script
  22.  
  23. sh tmp.script && exit $failures
  24. exit 1
  25.