test-import-order 726 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/sh
  2. exec guile -q -L "$srcdir" -s "$0" "$@"
  3. !#
  4. (define-module (base)
  5. #:export (push! order))
  6. (define order '())
  7. (define (push!)
  8. (set! order `(,@order ,(module-name (current-module)))))
  9. (define-module (test-1)
  10. #:use-module (base)
  11. #:use-module (test-import-order-a)
  12. #:use-module (test-import-order-b))
  13. (use-modules (test-import-order-c) (test-import-order-d))
  14. (if (not (equal? order
  15. '((test-import-order-a)
  16. (test-import-order-b)
  17. (test-import-order-c)
  18. (test-import-order-d))))
  19. (begin
  20. (format (current-error-port) "Unexpected import order: ~a" order)
  21. (exit 1))
  22. (exit 0))
  23. ;; Local Variables:
  24. ;; mode: scheme
  25. ;; End: