#! @SHELL@ 
exec ${GUILE} -s "$0"
!#

(debug-enable 'debug)
(debug-enable 'backtrace)

(debug-set! stack 500000)
(if (< (string->number (major-version)) 2)
    (debug-set! maxdepth 100000))

(display "  testing report module load ... ")
(use-modules (ice-9 syncase))
(use-modules (gnucash gnc-module))

(gnc:module-system-init)

(setenv "GNC_UNINSTALLED" "1")
(if (gnc:module-load "gnucash/report/report-gnome" 0)
    (begin 
      (display "ok\n")
      (exit 0))
    (begin 
      (display "failed\n")
      (exit -1)))
