Bug 709589 - make check fails with guile 2

The use of (macro? ) has changed in guile2.
In addition the test script has been reformatted
to make it more readable and easier to detect
where exactly it fails.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23394 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens
2013-11-13 15:52:04 +00:00
parent 8074fee8d9
commit 83aee2b5fb
+29 -8
View File
@@ -2,18 +2,39 @@
exec ${GUILE} -s "$0"
!#
(define exit-code 0)
(setenv "GNC_UNINSTALLED" "1")
(use-modules (gnucash gnc-module))
(gnc:module-system-init)
(if (gnc:module-load "gnucash/app-utils" 0)
(begin
(if (and (procedure? gnc:error->string)
(procedure? gnc-default-currency)
(macro? N_)
(string=? (N_ "foobar") "foobar"))
(exit 0)
(exit -1)))
(exit -1))
(display "Module gnucash/app-utils loaded successfully\n")
(begin
(display "Failed - module gnucash/app-utils not loaded successfully\n")
(set! exit-code -1)))
(if (procedure? gnc:error->string)
(display "Procedure gnc:error->string found\n")
(begin
(display "Failed - procedure gnc:error->string not found\n")
(set! exit-code -1)))
(if (procedure? gnc-default-currency)
(display "Procedure gnc-default-currency found\n")
(begin
(display "Failed - procedure gnc-default-currency not found\n")
(set! exit-code -1)))
(if (macro? (module-ref the-root-module 'N_))
(display "Macro N_ defined\n")
(begin
(display "Failed - macro N_ not defined\n")
(set! exit-code -1)))
(if (string=? (N_ "foobar") "foobar")
(display "Macro N_ works properly\n")
(begin
(display "Failed - macro N_ doesn't work\n")
(set! exit-code -1)))
(exit exit-code)