1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 22:31:12 +02:00

* lib.scm: Import (test-suite paths).

(data-file): New exported function.
This commit is contained in:
Jim Blandy 1999-06-15 08:39:39 +00:00
parent 73cb0a9704
commit 474d9afb8b

View file

@ -16,7 +16,8 @@
;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
;;;; Boston, MA 02111-1307 USA
(define-module (test-suite lib))
(define-module (test-suite lib)
#:use-module (test-suite paths))
(export
@ -38,7 +39,10 @@
make-log-reporter
full-reporter
user-reporter
format-test-name)
format-test-name
;; Finding test input files.
data-file)
;;;; If you're using Emacs's Scheme mode:
@ -402,3 +406,14 @@
(define (pass-if name condition)
((if condition pass fail) name))
;;;; Helping test cases find their files
;;; Returns FILENAME, relative to the directory the test suite data
;;; files were installed in, and makes sure the file exists.
(define (data-file filename)
(let ((f (in-vicinity datadir filename)))
(or (file-exists? f)
(error "Test suite data file does not exist: " f))
f))