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 <jra...@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/408b5ec2165fb43bef18b80ff44ba4d2f1b67f5f. > > 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.gnuc...@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.gnuc...@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 >>>> >>>> Start 120: test-gnc-option-scheme-output >>>> >>>> 1/1 Test #120: test-gnc-option-scheme-output ....***Failed 0.22 sec >>>> gnc:make-string-option is deprecated. Make and register the option in one >>>> command with gnc-register-string-option. >>>> gnc:register-option is deprecated. Use gnc-register-foo-option instead. >>>> gnc:option-set-value and indeed all direct option access is deprecated. >>>> Use gnc-set-option instead. >>>> gnc:make-font-option is deprecated. Make and register the option in one >>>> command with gnc-register-font-option. >>>> gnc:make-currency-option is deprecated. Make and register the option in >>>> one command with gnc-register-currency-option. >>>> gnc:make-budget-option is deprecated. Make and register the option in one >>>> command with gnc-register-color-option. >>>> gnc:option-set-default-value and indeed all direct option access is >>>> deprecated. Use gnc-set- option instead. >>>> gnc:make-commodity-option is deprecated. Make and register the option in >>>> one command with gnc-register-commodity-option. >>>> gnc:make-simple-boolean-option is deprecated. Make and register the option >>>> in one command with gnc-register-simple-boolean-option. >>>> gnc:make-pixmap-option is deprecated. Make and register the option in one >>>> command with gnc-register-pixmap-option. >>>> gnc:make-account-list-option is deprecated. Make and register the option >>>> in one command with gnc-register-account-list-option. >>>> gnc:make-multichoice-option is deprecated. Make and register the option in >>>> one command with gnc-register-multichoice-option. >>>> gnc:make-list-option is deprecated. Make and register the option in one >>>> command with gnc- register-list-option. >>>> gnc:make-number-range-option is deprecated. Make and register the option >>>> in one command with gnc-register-number-range-option. >>>> >>>> FORMAT: error with call: (format #f "'~f<===" ===>#f ) >>>> >>>> argument is not a number or a number string >>>> >>>> Backtrace: >>>> In ice-9/boot-9.scm: >>>> 1752:10 14 (with-exception-handler _ _ #:unwind? _ # _) >>>> >>>> In unknown file: >>>> 13 (apply-smob/0 #<thunk 7febbf8d3080>) >>>> >>>> In ice-9/boot-9.scm: >>>> 724:2 12 (call-with-prompt _ _ #<procedure default-prompt-handle…>) >>>> >>>> In ice-9/eval.scm: >>>> 619:8 11 (_ #(#(#<directory (guile-user) 7febbf8d8c80>))) >>>> >>>> In ice-9/command-line.scm: >>>> 185:18 10 (_ #<input: string 7febbf8d25b0>) >>>> >>>> In unknown file: >>>> 9 (eval (exit (run-test)) #<directory (guile-user) 7febbf…>) >>>> >>>> In ice-9/eval.scm: >>>> 191:35 8 (_ #f) >>>> >>>> In test-gnc-option-scheme-output.scm: >>>> 46:2 7 (run-test) >>>> >>>> 143:6 6 (test-gnc-number-range-option-to-scheme) >>>> >>>> In ice-9/format.scm: >>>> 1546:18 5 (format #f "'~f" #f) >>>> >>>> 269:11 4 (format:format-work "'~f" (#f)) >>>> 1054:6 3 (format:out-fixed #f #f ()) >>>> >>>> In ice-9/boot-9.scm: >>>> 1752:10 2 (with-exception-handler _ _ #:unwind? _ # _) >>>> >>>> In ice-9/format.scm: >>>> 102:10 1 (_) >>>> >>>> In ice-9/boot-9.scm: >>>> 1685:16 0 (raise-exception _ #:continuable? _) >>>> >>>> ice-9/boot-9.scm:1685:16: In procedure raise-exception: >>>> error in format >>>> [pass] line:150, test: string unchanged >>>> [pass] line:154, test: string value >>>> [pass] line:150, test: text unchanged >>>> _______________________________________________ >>>> gnucash-devel mailing list >>>> gnucash-devel@gnucash.org >>>> https://lists.gnucash.org/mailman/listinfo/gnucash-devel >> >> > > _______________________________________________ > gnucash-devel mailing list > gnucash-devel@gnucash.org > https://lists.gnucash.org/mailman/listinfo/gnucash-devel _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel