Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Locale tests fail wih "en-US" instead of "en-US-POSIX" #3

Open
robrwo opened this issue Jul 29, 2022 · 4 comments
Open

Locale tests fail wih "en-US" instead of "en-US-POSIX" #3

robrwo opened this issue Jul 29, 2022 · 4 comments

Comments

@robrwo
Copy link

robrwo commented Jul 29, 2022

Perl v5.34 on Linux.

# Versions for all modules listed in MYMETA.json (including optional ones):
# 
# === Configure Requires ===
# 
#     Module              Want Have
#     ------------------- ---- ----
#     ExtUtils::MakeMaker 6.17 7.64
# 
# === Build Requires ===
# 
#     Module              Want Have
#     ------------------- ---- ----
#     ExtUtils::MakeMaker  any 7.64
# 
# === Test Requires ===
# 
#     Module              Want     Have
#     ------------------- ---- --------
#     ExtUtils::MakeMaker  any     7.64
#     File::Spec           any     3.80
#     Test::More           any 1.302190
#     utf8                 any     1.24
# 
# === Test Recommends ===
# 
#     Module         Want     Have
#     ---------- -------- --------
#     CPAN::Meta 2.120900 2.150010
# 
# === Runtime Requires ===
# 
#     Module   Want Have
#     -------- ---- ----
#     Carp      any 1.52
#     overload  any 1.33
#     strict    any 1.12
#     warnings  any 1.51
# 
t/00-report-prereqs.t .. ok

#   Failed test '->locale ok'
#   at t/02_main.t line 82.
#          got: 'en-US'
#     expected: 'en-US-POSIX'
# Looks like you failed 1 test of 32.
t/02_main.t ............ 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/32 subtests 

Test Summary Report
-------------------
t/02_main.t          (Wstat: 256 (exited 1) Tests: 32 Failed: 1)
  Failed test:  17
  Non-zero exit status: 1
Files=2, Tests=33,  1 wallclock secs ( 0.02 usr  0.00 sys +  0.31 cusr  0.01 csys =  0.34 CPU)
Result: FAIL
Failed 1/2 test programs. 1/33 subtests failed.
Makefile:864: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 1
@falsifian
Copy link

I'm getting the same failure (got 'en-US', expected 'en-US-POSIX' for t/02_main.t) with perl 5.36.1 on OpenBSD-current.

@douglasdd
Copy link

Same here (5.30.3 on macOS 12.7.4) --

$ plenv --version
plenv 2.3.1-10-g2ef6c64

$ type -a perl
perl is /Users/ddd/.plenv/shims/perl
perl is /usr/bin/perl

$ perl --version
This is perl 5, version 30, subversion 3 (v5.30.3) built for darwin-2level

$ type -a cpanm
cpanm is /Users/ddd/.plenv/shims/cpanm

$ plenv which cpanm
/Users/ddd/.plenv/versions/5.30/bin/cpanm

$ cpanm DateTime::Tiny
--> Working on DateTime::Tiny
Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/DateTime-Tiny-1.07.tar.gz ... OK
Configuring DateTime-Tiny-1.07 ... OK
Building and testing DateTime-Tiny-1.07 ... FAIL
! Installing DateTime::Tiny failed. See /Users/ddd/.cpanm/work/1714863667.28553/build.log for details. Retry with --force to force install it.

$ cat  /Users/ddd/.cpanm/work/1714863667.28553/build.log
cpanm (App::cpanminus) 1.7047 on perl 5.030003 built for darwin-2level
Work directory is /Users/ddd/.cpanm/work/1714863667.28553
You have make /usr/bin/make
You have /usr/local/bin/wget
You have /usr/bin/tar: bsdtar 3.5.1 - libarchive 3.5.1 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8 
You have /usr/bin/unzip
Searching DateTime::Tiny () on cpanmetadb ...
--> Working on DateTime::Tiny
Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/DateTime-Tiny-1.07.tar.gz
-> OK
Unpacking DateTime-Tiny-1.07.tar.gz
Entering DateTime-Tiny-1.07
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.70)
Configuring DateTime-Tiny-1.07
Running Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for DateTime::Tiny
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have strict 0 ... Yes (1.11)
Checking if you have Test::More 0 ... Yes (1.302199)
Checking if you have Carp 0 ... Yes (1.50)
Checking if you have warnings 0 ... Yes (1.44)
Checking if you have overload 0 ... Yes (1.30)
Checking if you have File::Spec 0 ... Yes (3.78)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.70)
Checking if you have utf8 0 ... Yes (1.22)
Building and testing DateTime-Tiny-1.07
cp lib/DateTime/Tiny.pm blib/lib/DateTime/Tiny.pm
Manifying 1 pod document
PERL_DL_NONLAZY=1 "/Users/ddd/.plenv/versions/5.30/bin/perl5.30.3" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
# 
# Versions for all modules listed in MYMETA.json (including optional ones):
# 
# === Configure Requires ===
# 
#     Module              Want Have
#     ------------------- ---- ----
#     ExtUtils::MakeMaker 6.17 7.70
# 
# === Build Requires ===
# 
#     Module              Want Have
#     ------------------- ---- ----
#     ExtUtils::MakeMaker  any 7.70
# 
# === Test Requires ===
# 
#     Module              Want     Have
#     ------------------- ---- --------
#     ExtUtils::MakeMaker  any     7.70
#     File::Spec           any     3.78
#     Test::More           any 1.302199
#     utf8                 any     1.22
# 
# === Test Recommends ===
# 
#     Module         Want     Have
#     ---------- -------- --------
#     CPAN::Meta 2.120900 2.150010
# 
# === Runtime Requires ===
# 
#     Module   Want Have
#     -------- ---- ----
#     Carp      any 1.50
#     overload  any 1.30
#     strict    any 1.11
#     warnings  any 1.44
# 
t/00-report-prereqs.t .. ok

#   Failed test '->locale ok'
#   at t/02_main.t line 82.
#          got: 'en-US'
#     expected: 'en-US-POSIX'
# Looks like you failed 1 test of 32.
t/02_main.t ............ 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/32 subtests 

Test Summary Report
-------------------
t/02_main.t          (Wstat: 256 Tests: 32 Failed: 1)
  Failed test:  17
  Non-zero exit status: 1
Files=2, Tests=33,  1 wallclock secs ( 0.02 usr  0.00 sys +  0.36 cusr  0.06 csys =  0.44 CPU)
Result: FAIL
Failed 1/2 test programs. 1/33 subtests failed.
make: *** [test_dynamic] Error 22
-> FAIL Installing DateTime::Tiny failed. See /Users/ddd/.cpanm/work/1714863667.28553/build.log for details. Retry with --force to force install it.

@nfg
Copy link
Contributor

nfg commented Jun 14, 2024

I was just going to report this! It looks like this changed in DateTime::Locale version 1.33: https://metacpan.org/release/DROLSKY/DateTime-Locale-1.33/changes

@robrwo
Copy link
Author

robrwo commented Jun 15, 2024

I was just going to report this! It looks like this changed in DateTime::Locale version 1.33: https://metacpan.org/release/DROLSKY/DateTime-Locale-1.33/changes

CLDR has had no regard for changing locale strings in ways that break code that relies on it. See https://unicode-org.atlassian.net/browse/CLDR-14412

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants