How to get gnc:gettext binding to work isolated for the report system?

Carsten Rinke carsten.rinke at gmx.de
Sun Mar 12 07:54:24 EDT 2017


Hi,

I am trying to figure out how unit testing for the report system might 
work, based on Glib-test.

The tests are run in the build/src/report/report-system/test 
build-subdirectory, running make check.

Only the report system module is loaded by calling 
gnc_module_load("gnucash/report/report-system", 0);

My understanding is that this automatically loads the modules for engine 
and app-utils, too.

First tests for e.g. gnc:define-report are working now.

Now I get to procedures that include the call to gnc:gettext, which is 
not working:
A call like
    (define rep-templ-name (gnc:gettext (gnc:report-template-name rep-templ)
ends up with
    ERROR: In procedure gnc-gettext-helper:
    ERROR: In procedure SWIG_Guile_scm2newstr: Wrong type argument in 
position 1: #f

To me it seems that the SWIG binding towards gnc-gettext-helper (defined 
in app-utils/gettext.scm) is not working with this test setup.

I tried to update report-system.i adding
     #include <gnc-gettext-util.h>
and
     char * gnc_gettext_helper(const char * str);
but after recompilation that does not show any effect, same error message.

Any idea how this binding could be resolved?

Thanks in advance,
Carsten



More information about the gnucash-devel mailing list