mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[test-core-utils] uses srfi-64
This commit is contained in:
parent
f4941a5b01
commit
3ff5bd8246
@ -25,7 +25,6 @@ gnc_add_test_with_guile(test-scm-query test-scm-query.cpp ENGINE_TEST_INCLUDE_DI
|
|||||||
|
|
||||||
|
|
||||||
set(bindings_test_SCHEME
|
set(bindings_test_SCHEME
|
||||||
test-core-utils.scm
|
|
||||||
test-create-account.scm
|
test-create-account.scm
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -59,6 +58,7 @@ add_dependencies(check scm-test-engine)
|
|||||||
gnc_add_scheme_tests("${engine_test_SCHEME}")
|
gnc_add_scheme_tests("${engine_test_SCHEME}")
|
||||||
|
|
||||||
set (scm_tests_with_srfi64_SOURCES
|
set (scm_tests_with_srfi64_SOURCES
|
||||||
|
test-core-utils.scm
|
||||||
test-business-core.scm
|
test-business-core.scm
|
||||||
test-scm-engine.scm
|
test-scm-engine.scm
|
||||||
)
|
)
|
||||||
|
@ -1,17 +1,20 @@
|
|||||||
(define exit-code 0)
|
|
||||||
(setenv "GNC_UNINSTALLED" "1")
|
(setenv "GNC_UNINSTALLED" "1")
|
||||||
|
|
||||||
|
(use-modules (srfi srfi-64))
|
||||||
|
(use-modules (tests srfi64-extras))
|
||||||
(use-modules (gnucash core-utils))
|
(use-modules (gnucash core-utils))
|
||||||
|
|
||||||
(if (procedure? (module-ref (current-module) 'N_))
|
(define (N_-tests)
|
||||||
(display "N_ defined\n")
|
|
||||||
(begin
|
|
||||||
(display "Failed - N_ not defined\n")
|
|
||||||
(set! exit-code -1)))
|
|
||||||
|
|
||||||
(if (string=? (N_ "foobar") "foobar")
|
(test-assert "N_ defined"
|
||||||
(display "N_ works properly\n")
|
(module-ref (current-module) 'N_))
|
||||||
(begin
|
|
||||||
(display "Failed - N_ doesn't work\n")
|
|
||||||
(set! exit-code -1)))
|
|
||||||
|
|
||||||
(exit exit-code)
|
(test-equal "N_ works properly"
|
||||||
|
"foobar"
|
||||||
|
(N_ "foobar")))
|
||||||
|
|
||||||
|
(define (run-test)
|
||||||
|
(test-runner-factory gnc:test-runner)
|
||||||
|
(test-begin "test-core-utils")
|
||||||
|
(N_-tests)
|
||||||
|
(test-end "test-core-utils"))
|
||||||
|
Loading…
Reference in New Issue
Block a user