mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-09 15:10:29 +02:00
2006-03-04 Ludovic Courtès <ludovic.courtes@laas.fr>
* test-suite/tests/modules.test: New file.
This commit is contained in:
parent
6c4015417a
commit
5f96214d0d
1 changed files with 50 additions and 0 deletions
50
test-suite/tests/modules.test
Normal file
50
test-suite/tests/modules.test
Normal file
|
@ -0,0 +1,50 @@
|
|||
;;;; modules.test --- exercise some of guile's module stuff -*- scheme -*-
|
||||
|
||||
;;;; Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
;;;; License as published by the Free Software Foundation; either
|
||||
;;;; version 2.1 of the License, or (at your option) any later version.
|
||||
;;;;
|
||||
;;;; This library is distributed in the hope that it will be useful,
|
||||
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
;;;; Lesser General Public License for more details.
|
||||
;;;;
|
||||
;;;; You should have received a copy of the GNU Lesser General Public
|
||||
;;;; License along with this library; if not, write to the Free Software
|
||||
;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
(use-modules (test-suite lib))
|
||||
|
||||
(with-test-prefix "autoload"
|
||||
|
||||
(pass-if "autoloaded"
|
||||
(catch #t
|
||||
(lambda ()
|
||||
;; Simple autoloading.
|
||||
(eval '(begin
|
||||
(define-module (test-autoload-one)
|
||||
:autoload (ice-9 q) (make-q))
|
||||
(not (not make-q)))
|
||||
(current-module)))
|
||||
(lambda (key . args)
|
||||
#f)))
|
||||
|
||||
;; In Guile 1.8.0 this failed because the binder in
|
||||
;; `make-autoload-interface' would try to remove the autoload interface
|
||||
;; from the module's "uses" without making sure it is still part of these
|
||||
;; "uses".
|
||||
;;
|
||||
(pass-if "autoloaded+used"
|
||||
(catch #t
|
||||
(lambda ()
|
||||
(eval '(begin
|
||||
(define-module (test-autoload-two)
|
||||
:autoload (ice-9 q) (make-q)
|
||||
:use-module (ice-9 q))
|
||||
(not (not make-q)))
|
||||
(current-module)))
|
||||
(lambda (key . args)
|
||||
#f))))
|
Loading…
Add table
Add a link
Reference in a new issue