Use egrep for better compatibility.
authorMikael Djurfeldt <djurfeldt@nada.kth.se>
Wed, 15 Sep 1999 15:55:06 +0000 (15:55 +0000)
committerMikael Djurfeldt <djurfeldt@nada.kth.se>
Wed, 15 Sep 1999 15:55:06 +0000 (15:55 +0000)
test-suite/tests/c-api.test

index 9bea757..327dc3e 100644 (file)
@@ -20,8 +20,8 @@
 
 (define srcdir (cdr (assq 'srcdir %guile-build-info)))
 
-(define (grep string filename)
-  (zero? (system (string-append "grep '" string "' " filename " >/dev/null"))))
+(define (egrep string filename)
+  (zero? (system (string-append "egrep '" string "' " filename " >/dev/null"))))
 
 (define (seek-offset-test dirname)
   (let ((dir (opendir dirname)))
@@ -29,8 +29,9 @@
        ((eof-object? filename))
       (if (eqv? (string-ref filename (- (string-length filename) 1)) #\c)
          (let ((file (string-append dirname "/" filename)))
-           (if (and (grep "SEEK_\\(SET\\|CUR\\|END\\)" file)
-                    (not (grep "unistd.h" file)))
+           (if (and (file-exists? file)
+                    (egrep "SEEK_(SET|CUR|END)" file)
+                    (not (egrep "unistd.h" file)))
                (fail file)))))))
 
 ;;; A rough conservative test to check that all source files