gnucash/libgnucash/gnc-module/test/test-gnc-module-scm-module.scm
John Ralls cac307602f Build or link all Scheme test files into a directory "tests".
Instead of random locations only occasionally related to the
corresponding source.

Includes renaming libgnucash/engine/test/test-extras.scm and
gnucash/report/report-system/test/test-extras.scm to avoid a
naming conflict.
2019-05-25 10:09:07 +02:00

15 lines
671 B
Scheme
Executable File

(use-modules (tests unittest-support))
(define log-domain "gnc.module")
(define check (new-TestErrorStruct))
(define log-level (G-LOG-LEVEL-WARNING))
(define msg "Module '../../../libgnucash/gnc-module/test/misc-mods/.libs/libgncmod_futuremodsys.so' requires newer module system\n")
(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 (not (gnc:module-load "gnucash/foo" 0)) (exit -1))
(exit (foo:scheme-hello))
(g-log-remove-handler log-domain handler)