[GNC-dev] Test failure on current master branch

Geert Janssens geert.gnucash at kobaltwit.be
Tue Mar 14 04:13:30 EDT 2023


Got a chance to test this yesterday. Your change fixed it indeed.

Regards,

Geert

Op donderdag 2 maart 2023 21:36:00 CET schreef John Ralls:
> Found and fixed it. It turns out that string->number isn't locale-sensitive,
> std::to_string is. I replaced it with ostringstream and pushed.
> 
> Regards,
> John Ralls
> 
> > On Mar 2, 2023, at 9:16 AM, john <jralls at ceridwen.us> wrote:
> > 
> > Geert,
> > 
> > Aha! That would certainly explain why I  couldn't reproduce it. That
> > change is from
> > https://github.com/Gnucash/gnucash/commit/408b5ec2165fb43bef18b80ff44ba4d
> > 2f1b67f5f. Yes, no doubt string->number expects the number to be
> > represented in the current locale, so it wants "42,0" and getting "42.0"
> > returns #f
> > (https://www.gnu.org/software/guile/manual/html_node/Conversion.html).
> > I'll have to find another way to make that conversion.
> > 
> > Regards,
> > John Ralls
> > 
> >> On Mar 2, 2023, at 5:39 AM, Geert Janssens <geert.gnucash at kobaltwit.be>
> >> wrote:
> >> 
> >> I still haven't figured out exactly where it goes wrong, but I did
> >> discover it's a locale related issue. For some reason this particular
> >> test has become locale sensitive.
> >> 
> >> If I run the test as follows:
> >> LC_ALL=C ctest -V -R test-gnc-option-scheme-output
> >> it passes. If however I do this:
> >> LC_ALL=fr_FR.utf8 ctest -V -R test-gnc-option-scheme-output
> >> it fails. I have also tried nl_BE.utf8 (my native locale), which fails as
> >> well. I suspect the call to (string->number (GncOption-serialize
> >> option)) on line 459 is failing. Perhaps GncOption-serialize spits out
> >> numbers in C locale while string->number uses local locale or vice versa
> >> ?
> >> 
> >> Regards,
> >> 
> >> Geert
> >> 
> >> Op woensdag 1 maart 2023 04:41:14 CET schreef John Ralls:
> >>> Geert,
> >>> 
> >>> I can't replicate that, tried on Debian 10, Debian Unstable, and Arch.
> >>> I'm
> >>> installing a Fedora 37 VM but I'm out of time for today and won't get to
> >>> the point of a test build of GnuCash.
> >>> 
> >>> Regards,
> >>> John Ralls
> >>> 
> >>>> On Feb 28, 2023, at 2:07 PM, Geert Janssens
> >>>> <geert.gnucash at kobaltwit.be>
> >>>> wrote:
> >>>> 
> >>>> Hi,
> >>>> 
> >>>> With the current master branch I get the following test failure:
> >>>> 
> >>>> ctest --rerun-failed --output-on-failure
> >>>> Test project /home/janssege/Development/gnucash/master/build
> >>>> 


More information about the gnucash-devel mailing list