mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-29 12:14:31 -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
|
||||
test-core-utils.scm
|
||||
test-create-account.scm
|
||||
)
|
||||
|
||||
@ -59,6 +58,7 @@ add_dependencies(check scm-test-engine)
|
||||
gnc_add_scheme_tests("${engine_test_SCHEME}")
|
||||
|
||||
set (scm_tests_with_srfi64_SOURCES
|
||||
test-core-utils.scm
|
||||
test-business-core.scm
|
||||
test-scm-engine.scm
|
||||
)
|
||||
|
@ -1,17 +1,20 @@
|
||||
(define exit-code 0)
|
||||
(setenv "GNC_UNINSTALLED" "1")
|
||||
|
||||
(use-modules (srfi srfi-64))
|
||||
(use-modules (tests srfi64-extras))
|
||||
(use-modules (gnucash core-utils))
|
||||
|
||||
(if (procedure? (module-ref (current-module) 'N_))
|
||||
(display "N_ defined\n")
|
||||
(begin
|
||||
(display "Failed - N_ not defined\n")
|
||||
(set! exit-code -1)))
|
||||
(define (N_-tests)
|
||||
|
||||
(if (string=? (N_ "foobar") "foobar")
|
||||
(display "N_ works properly\n")
|
||||
(begin
|
||||
(display "Failed - N_ doesn't work\n")
|
||||
(set! exit-code -1)))
|
||||
(test-assert "N_ defined"
|
||||
(module-ref (current-module) 'N_))
|
||||
|
||||
(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