mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 12:20:26 +02:00
Rework c-api.test to use test lib
The failure path for the c-api.test had been to call the undefined function 'fail', instead of logging the error like the other tests. * test-suite/tests/c-api.test: modified
This commit is contained in:
parent
aed9483ba1
commit
34a1045f7d
1 changed files with 14 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
||||||
;;;; c-api.test --- complementary test suite for the c-api -*- scheme -*-
|
;;;; c-api.test --- complementary test suite for the c-api -*- scheme -*-
|
||||||
;;;; MDJ 990915 <djurfeldt@nada.kth.se>
|
;;;; MDJ 990915 <djurfeldt@nada.kth.se>
|
||||||
;;;;
|
;;;;
|
||||||
;;;; Copyright (C) 1999, 2006 Free Software Foundation, Inc.
|
;;;; Copyright (C) 1999, 2006, 2012 Free Software Foundation, Inc.
|
||||||
;;;;
|
;;;;
|
||||||
;;;; This library is free software; you can redistribute it and/or
|
;;;; This library is free software; you can redistribute it and/or
|
||||||
;;;; modify it under the terms of the GNU Lesser General Public
|
;;;; modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -17,6 +17,8 @@
|
||||||
;;;; License along with this library; if not, write to the Free Software
|
;;;; License along with this library; if not, write to the Free Software
|
||||||
;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
(use-modules (test-suite lib))
|
||||||
|
|
||||||
(define srcdir (cdr (assq 'srcdir %guile-build-info)))
|
(define srcdir (cdr (assq 'srcdir %guile-build-info)))
|
||||||
|
|
||||||
(define (egrep string filename)
|
(define (egrep string filename)
|
||||||
|
@ -31,9 +33,8 @@
|
||||||
(eqv? (string-ref filename (- (string-length filename) 2)) #\.))
|
(eqv? (string-ref filename (- (string-length filename) 2)) #\.))
|
||||||
(let ((file (string-append dirname "/" filename)))
|
(let ((file (string-append dirname "/" filename)))
|
||||||
(if (and (file-exists? file)
|
(if (and (file-exists? file)
|
||||||
(egrep "SEEK_(SET|CUR|END)" file)
|
(egrep "SEEK_(SET|CUR|END)" file))
|
||||||
(not (egrep "unistd.h" file)))
|
(pass-if file (egrep "unistd.h" file))))))))
|
||||||
(fail file)))))))
|
|
||||||
|
|
||||||
;;; A rough conservative test to check that all source files
|
;;; A rough conservative test to check that all source files
|
||||||
;;; which use SEEK_SET, SEEK_CUR, and SEEK_END include unistd.h.
|
;;; which use SEEK_SET, SEEK_CUR, and SEEK_END include unistd.h.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue