Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Tests fail on Strawberry Perl 5.24.1.1 (64bit) Windows 10 #7

Open
jfroebe opened this issue Apr 4, 2017 · 4 comments
Open

Tests fail on Strawberry Perl 5.24.1.1 (64bit) Windows 10 #7

jfroebe opened this issue Apr 4, 2017 · 4 comments

Comments

@jfroebe
Copy link

jfroebe commented Apr 4, 2017

Platform: Strawberry Perl 5.24.1.1 (64bit) Windows 10
Win32::Unicode version: 0.38

win32-unicode-testfailure.txt

@nooninm
Copy link

nooninm commented Aug 3, 2017

Same problem.
Windows 7, 64 bit. Using ActiveState Perl v5.24.1.
I get the same results as in in your results text file, minus the unreadable unicode.
Same two errant line numbers for t/04_print.t as well.
I previously reported this two years ago on another Perl version, at
https://rt.cpan.org/Public/Bug/Display.html?id=117348
Same line numbers then, too.

@ikegami
Copy link

ikegami commented Jun 12, 2020

It appears to be a bad test because the function actually works correctly on a system that gives the error.

>chcp 65001
Active code page: 65001

>perl -Mblib -e"use Win32::Unicode; printW qq{I \x{2665} Perl\n};"
I ♥ Perl

If this is the only error you get, you can force the module's installation.

@ikegami
Copy link

ikegami commented Jun 16, 2020

My earlier comment was incorrect. printW provides unusable semantics, and this failed test is the proof of this.

printW to a console: Expects a string of decoded text (e.g. "\x{2660}")

printW to a file: Expects a string of encoded text (e.g. encode($some_encoding, "\x{2660}"))

So depending on whether someone does script.pl or script.pl >file, you need to pass different values to printW. The test environment is akin to the later, but the test is written expecting the former. The solution is NOT to just fix the text, but provide a function that does sensible in both environments.

@LeeThompson
Copy link

LeeThompson commented Jun 5, 2022

Same thing on Strawberry Perl 5.32.1 (x64).

Seems ironic that a Win32 module fails to install on Windows due to test failures.

#   Failed test at t/04_print.t line 14.
# STDOUT is:
#  I ♥ Perl
# not:
#  I ΓÖÑ Perl
# as expected

#   Failed test at t/04_print.t line 15.
# STDOUT is:
# [ I ♥ Perl]
# not:
# [ I ΓÖÑ Perl]
# as expected

#   Failed test at t/04_print.t line 16.
# STDOUT is:
#  I ♥ Perl
#
# not:
#  I ΓÖÑ Perl
#
# as expected
# Looks like you failed 3 tests of 13.

t/04_print.t           (Wstat: 768 Tests: 13 Failed: 3)
  Failed tests:  1-3
  Non-zero exit status: 3
Files=27, Tests=284, 23 wallclock secs ( 0.16 usr +  0.09 sys =  0.25 CPU)
Result: FAIL
Failed 1/27 test programs. 3/284 subtests failed.
gmake: *** [Makefile:1033: test_dynamic] Error 255
  XAICRON/Win32-Unicode-0.38.tar.gz
  C:\STRAWB~1\c\bin\gmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports XAICRON/Win32-Unicode-0.38.tar.gz
Stopping: 'install' failed for 'X/XA/XAICRON/Win32-Unicode-0.38.tar.gz'.

jddurand added a commit to jddurand/p5-win32-unicode that referenced this issue Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants