Skip Menu |

This queue is for tickets about the Finance-CoinbasePro-API-CLI CPAN distribution.

Report information
The Basics
Id: 127400
Status: resolved
Priority: 0/
Queue: Finance-CoinbasePro-API-CLI

People
Owner: joshr-cpan [...] joshr.com
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 0.006
  • 0.007
  • 0.008
Fixed in: 0.012



Subject: Tests fail with non-English locale
See subject. For example, with a German locale on a FreeBSD system: ... # Failed test 'account as string' # at t/01-modules.t line 13. # got: '$3.469' # expected: '$3,469' # Failed test 'account as string with usd' # at t/01-modules.t line 14. # got: '$3.469' # expected: '$3,469' # Failed test 'value: 1USD as string' # at t/01-modules.t line 80. # got: '$1,00' # expected: '$1.00' # Looks like you failed 3 tests of 17. t/01-modules.t ........... Dubious, test returned 3 (wstat 768, 0x300) Failed 3/17 subtests ... On a Linux system with German locale it looks different, but still a failure: # Failed test 'account as string' # at t/01-modules.t line 13. # got: '3.469$' # expected: '$3,469' # Failed test 'account as string with usd' # at t/01-modules.t line 14. # got: '3.469$' # expected: '$3,469' # Failed test 'value: 1USD as string' # at t/01-modules.t line 80. # got: '1,00$' # expected: '$1.00' # Looks like you failed 3 tests of 17. t/01-modules.t ........... Dubious, test returned 3 (wstat 768, 0x300) Failed 3/17 subtests ...
On 2018-10-17 16:24:18, SREZIC wrote: Show quoted text
> See subject. For example, with a German locale on a FreeBSD system: > > ... > # Failed test 'account as string' > # at t/01-modules.t line 13. > # got: '$3.469' > # expected: '$3,469' > > # Failed test 'account as string with usd' > # at t/01-modules.t line 14. > # got: '$3.469' > # expected: '$3,469' > > # Failed test 'value: 1USD as string' > # at t/01-modules.t line 80. > # got: '$1,00' > # expected: '$1.00' > # Looks like you failed 3 tests of 17. > t/01-modules.t ........... > Dubious, test returned 3 (wstat 768, 0x300) > Failed 3/17 subtests > ... > > > On a Linux system with German locale it looks different, but still a > failure: > > # Failed test 'account as string' > # at t/01-modules.t line 13. > # got: '3.469$' > # expected: '$3,469' > > # Failed test 'account as string with usd' > # at t/01-modules.t line 14. > # got: '3.469$' > # expected: '$3,469' > > # Failed test 'value: 1USD as string' > # at t/01-modules.t line 80. > # got: '1,00$' > # expected: '$1.00' > # Looks like you failed 3 tests of 17. > t/01-modules.t ........... > Dubious, test returned 3 (wstat 768, 0x300) > Failed 3/17 subtests > ...
The issue is still not fixed. It can be reproduced with a clean environment in a docker instance --- see below for a sample Dockerfile. I see that you are setting now the LC_ALL environment variable in the test script. Maybe this is not enough, and POSIX::setlocale has to be called, too. # docker build -t perl-test . && docker run perl-test FROM debian:stretch RUN echo "cache invalidation #20181018" RUN apt-get -y update RUN apt-get -y install perl-modules RUN apt-get -y install make RUN apt-get -y install locales RUN perl -i -pe 's/^#\s+(de_DE.UTF-8)/$1/' /etc/locale.gen RUN locale-gen ENV LC_ALL=de_DE.UTF-8 # Speed up installation RUN apt-get -y install libmouse-perl libdist-zilla-perl RUN apt-get -y install libtime-moment-perl CMD cpan -t JOSHR/Finance-CoinbasePro-API-CLI-0.008.tar.gz
Thanks SREZIC, will try to fix this issue in the next couple of days.