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

(setenv "GNC_UNINSTALLED" "1")
(display "  testing stylesheet module load ... ")
(use-modules (gnucash unittest-support))
(define log-domain "gnc.report.core")
(define check (new-TestErrorStruct))
(define log-level (G-LOG-LEVEL-CRITICAL))
(define msg "gnc_get_default_report_font_family: assertion `top_list != NULL' failed")
(TestErrorStruct-log-domain-set check log-domain)
(TestErrorStruct-log-level-set check log-level)
(TestErrorStruct-msg-set check msg)
(define handler (test-set-checked-handler log-domain log-level check))
(use-modules (gnucash gnc-module))
(gnc:module-system-init)

(if (gnc:module-load "gnucash/report/stylesheets" 0)
    (begin 
      (g-log-remove-handler log-domain handler)
      (display "ok\n")
      (exit 0))
    (begin 
      (g-log-remove-handler log-domain handler)
      (display "failed\n")
      (exit -1)))


 

