# Failed test 'format_for_editing should return unformated integer part with 2 decimals' # at t/Prices.t line 610. # got: ' 1234567.00' # expected: '1234567.00'
Hi Marc, they pass ok for me: prove t/Prices.t t/Prices.t .. ok All tests successful. Files=1, Tests=16, 1 wallclock secs ( 0.04 usr 0.00 sys + 0.59 cusr 0.05 csys = 0.68 CPU) Result: PASS
Hi Katrin, See my results below. Maybe related to Number::Format? cpan -D Number::Format Installed: 1.73 CPAN: 1.73 up to date http://search.cpan.org/~wrw/Number-Format-1.73/Format.pm Koha version 3.19.00.016 Perl version 5.014002 ------------ prove t/Prices.t t/Prices.t .. 1/16 # Failed test 'format_for_editing should return unformated integer part with 2 decimals' # at t/Prices.t line 610. # got: ' 1234567.00' # expected: '1234567.00' # Failed test 'format_for_editing should return unformated integer part with 2 decimals' # at t/Prices.t line 611. # got: ' 1234567.89' # expected: '1234567.89' # Failed test 'format_for_editing should return unformated integer part with 2 decimals' # at t/Prices.t line 610. # got: ' 1234567.00' # expected: '1234567.00' # Failed test 'format_for_editing should return unformated integer part with 2 decimals' # at t/Prices.t line 611. # got: ' 1234567.89' # expected: '1234567.89' # Looks like you failed 4 tests of 16. t/Prices.t .. Dubious, test returned 4 (wstat 1024, 0x400) Failed 4/16 subtests Test Summary Report ------------------- t/Prices.t (Wstat: 1024 Tests: 16 Failed: 4) Failed tests: 13-16 Non-zero exit status: 4 Files=1, Tests=16, 1 wallclock secs ( 0.01 usr 0.01 sys + 0.35 cusr 0.18 csys = 0.55 CPU) Result: FAIL
Hi Marc, I have the same version. What is your locale setting?
Hi Katrin, # dpkg -l locales ||/ Name Version Architektur Beschreibung +++-==============-============-============-================================= ii locales 2.13-38+deb7 all Embedded GNU C Library: National # locale LANG=de_CH.UTF-8 LANGUAGE=de_CH:de LC_CTYPE="de_CH.UTF-8" LC_NUMERIC="de_CH.UTF-8" LC_TIME="de_CH.UTF-8" LC_COLLATE="de_CH.UTF-8" LC_MONETARY="de_CH.UTF-8" LC_MESSAGES="de_CH.UTF-8" LC_PAPER="de_CH.UTF-8" LC_NAME="de_CH.UTF-8" LC_ADDRESS="de_CH.UTF-8" LC_TELEPHONE="de_CH.UTF-8" LC_MEASUREMENT="de_CH.UTF-8" LC_IDENTIFICATION="de_CH.UTF-8" LC_ALL=
With de_DE.UTF-8 *) tests pass OK What impact have locales on Koha? Could there be bugs related to locales? *) # locale LANG=de_DE.UTF-8 LANGUAGE=de_CH:de LC_CTYPE="de_DE.UTF-8" LC_NUMERIC="de_DE.UTF-8" LC_TIME="de_DE.UTF-8" LC_COLLATE="de_DE.UTF-8" LC_MONETARY="de_DE.UTF-8" LC_MESSAGES="de_DE.UTF-8" LC_PAPER="de_DE.UTF-8" LC_NAME="de_DE.UTF-8" LC_ADDRESS="de_DE.UTF-8" LC_TELEPHONE="de_DE.UTF-8" LC_MEASUREMENT="de_DE.UTF-8" LC_IDENTIFICATION="de_DE.UTF-8" LC_ALL=
I think it's the Number::Price that might be a bit specific here - adding Jonathan to the bug report.
Created attachment 36932 [details] [review] Bug 13836: Does not separate symbol and value if symbol is not displayed. This patch force the separation between the symbol and the value to an empty string if the symbol is not displayed.
Created attachment 36934 [details] [review] [Signed-off] Bug 13836: Does not separate symbol and value if symbol is not displayed. This patch force the separation between the symbol and the value to an empty string if the symbol is not displayed. Tested with locale de_CH.UTF-8, prove t/Prices.t is now successful. Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 36937 [details] [review] [PASSED QA] Bug 13836: Does not separate symbol and value if symbol is not displayed. This patch force the separation between the symbol and the value to an empty string if the symbol is not displayed. Tested with locale de_CH.UTF-8, prove t/Prices.t is now successful. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Patch pushed to master. Thanks Jonathan!
Pushed to 3.18.x will be in 3.18.5