Subject: | Unicode text get mangled |
Hello,
While trying to install Sys::Cmd, the tests failed with the following errors:
$ prove -lv t/10-command.t
t/10-command.t ..
1..93
ok 1 - The object isa Sys::Cmd
ok 2 - The object isa GLOB
ok 3 - stdin opened
ok 4 - The object isa GLOB
ok 5 - stdout opened
ok 6 - The object isa GLOB
ok 7 - stderr opened
ok 8 - cmdline
ok 9 - no errput
not ok 10 - perl t/info.pl
# Failed test 'perl t/info.pl'
# at t/10-command.t line 137.
# Structures begin differing at:
# $got->{env}{ITERM_PROFILE} = 'D?faut'
# $expected->{env}{ITERM_PROFILE} = 'Défaut'
ok 11 - exit 0
ok 12 - no signal received
ok 13 - no core dumped
ok 14 - The object isa Sys::Cmd
ok 15 - The object isa GLOB
ok 16 - stdin opened
ok 17 - The object isa GLOB
ok 18 - stdout opened
ok 19 - The object isa GLOB
ok 20 - stderr opened
ok 21 - cmdline
ok 22 - no errput
not ok 23 - perl t/info.pl
# Failed test 'perl t/info.pl'
# at t/10-command.t line 137.
# Structures begin differing at:
# $got->{env}{ITERM_PROFILE} = 'D?faut'
# $expected->{env}{ITERM_PROFILE} = 'Défaut'
ok 24 - exit 0
ok 25 - no signal received
ok 26 - no core dumped
ok 27 - The object isa Sys::Cmd
ok 28 - The object isa GLOB
ok 29 - stdin opened
ok 30 - The object isa GLOB
ok 31 - stdout opened
ok 32 - The object isa GLOB
ok 33 - stderr opened
ok 34 - cmdline
ok 35 - no errput
not ok 36 - perl t/info.pl
# Failed test 'perl t/info.pl'
# at t/10-command.t line 137.
# Structures begin differing at:
# $got->{env}{ITERM_PROFILE} = 'D?faut'
# $expected->{env}{ITERM_PROFILE} = 'Défaut'
ok 37 - exit 0
ok 38 - no signal received
ok 39 - no core dumped
ok 40 - The object isa Sys::Cmd
ok 41 - The object isa GLOB
ok 42 - stdin opened
ok 43 - The object isa GLOB
ok 44 - stdout opened
ok 45 - The object isa GLOB
ok 46 - stderr opened
ok 47 - cmdline
ok 48 - no errput
not ok 49 - perl t/info.pl
# Failed test 'perl t/info.pl'
# at t/10-command.t line 137.
# Structures begin differing at:
# $got->{env}{ITERM_PROFILE} = 'D?faut'
# $expected->{env}{ITERM_PROFILE} = 'Défaut'
ok 50 - exit 0
ok 51 - no signal received
ok 52 - no core dumped
ok 53 - The object isa Sys::Cmd
ok 54 - The object isa GLOB
ok 55 - stdin opened
ok 56 - The object isa GLOB
ok 57 - stdout opened
ok 58 - The object isa GLOB
ok 59 - stderr opened
ok 60 - cmdline
ok 61 - no errput
not ok 62 - perl t/info.pl
# Failed test 'perl t/info.pl'
# at t/10-command.t line 137.
# Structures begin differing at:
# $got->{env}{ITERM_PROFILE} = 'D?faut'
# $expected->{env}{ITERM_PROFILE} = 'Défaut'
ok 63 - exit 0
ok 64 - no signal received
ok 65 - no core dumped
ok 66 - The object isa Sys::Cmd
ok 67 - The object isa GLOB
ok 68 - stdin not opened
ok 69 - The object isa GLOB
ok 70 - stdout opened
ok 71 - The object isa GLOB
ok 72 - stderr opened
ok 73 - cmdline
ok 74 - no errput
not ok 75 - perl t/info.pl
# Failed test 'perl t/info.pl'
# at t/10-command.t line 137.
# Structures begin differing at:
# $got->{env}{ITERM_PROFILE} = 'D?faut'
# $expected->{env}{ITERM_PROFILE} = 'Défaut'
ok 76 - exit 0
ok 77 - no signal received
ok 78 - no core dumped
ok 79 - The object isa Sys::Cmd
ok 80 - The object isa GLOB
ok 81 - stdin not opened
ok 82 - The object isa GLOB
ok 83 - stdout opened
ok 84 - The object isa GLOB
ok 85 - stderr opened
ok 86 - cmdline
ok 87 - no errput
not ok 88 - perl t/info.pl
# Failed test 'perl t/info.pl'
# at t/10-command.t line 137.
# Structures begin differing at:
# $got->{env}{ITERM_PROFILE} = 'D?faut'
# $expected->{env}{ITERM_PROFILE} = 'Défaut'
ok 89 - exit 0
ok 90 - no signal received
ok 91 - no core dumped
ok 92 - command failed:
ok 93 - ... expected error message
# Looks like you failed 7 tests of 93.
Dubious, test returned 7 (wstat 1792, 0x700)
Failed 7/93 subtests
Test Summary Report
-------------------
t/10-command.t (Wstat: 1792 Tests: 93 Failed: 7)
Failed tests: 10, 23, 36, 49, 62, 75, 88
Non-zero exit status: 7
Files=1, Tests=93, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.19 cusr 0.06 csys = 0.29 CPU)
Result: FAIL
The reason is that the environment variable ITERM_DEFAULT contains the name of the default
profile, which is in French "Défaut". However, it looks like the string gets somehow mangled by
Sys::Cmd.
I took a quick look in the source, but saw no obvious flaw. I'll see if I can give a better look
later.
--
Close the world, txEn eht nepO.