Skip Menu |

This queue is for tickets about the Complete-Env CPAN distribution.

Report information
The Basics
Id: 120969
Status: resolved
Priority: 0/
Queue: Complete-Env

People
Owner: Nobody in particular
Requestors: jason [...] froebe.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.39
Fixed in: (no value)



Subject: Tests fail on Strawberry Perl 5.24.1.1 (64bit) Windows 10
Platform: Strawberry Perl 5.24.1.1 (64bit) Windows 10 Complete::Env version: 0.39 Show quoted text
cpan> install Complete::Env
Database was generated on Tue, 04 Apr 2017 18:56:26 GMT Running install for module 'Complete::Env' Checksum for C:\Perl\STRAWB~1\cpan\sources\authors\id\P\PE\PERLANCAR\Complete-Env-0.39.tar.gz ok Scanning cache C:\Perl\STRAWB~1\cpan\build for sizes ............................................................................DONE Configuring P/PE/PERLANCAR/Complete-Env-0.39.tar.gz with Makefile.PL Checking if your kit is complete... Looks good Generating a dmake-style Makefile Writing Makefile for Complete::Env Writing MYMETA.yml and MYMETA.json PERLANCAR/Complete-Env-0.39.tar.gz C:\Perl\Strawberry\perl\bin\perl.exe Makefile.PL -- OK Running make for P/PE/PERLANCAR/Complete-Env-0.39.tar.gz cp lib/Complete/Env.pm blib\lib\Complete\Env.pm PERLANCAR/Complete-Env-0.39.tar.gz C:\Perl\STRAWB~1\c\bin\dmake.exe -- OK Running make test "C:\Perl\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/00-compile.t .............. ok t/author-pod-coverage.t ..... skipped: these tests are for testing by the author t/author-pod-syntax.t ....... skipped: these tests are for testing by the author t/complete_env.t ............ ok t/complete_env_elem.t ....... 1/? # Failed test 'ba (result)' # at t/complete_env_elem.t line 30. # Structures begin differing at: # $got->[0] = 'foo:bar:baz' # $expected->[0] = 'bar' # [ # 'foo:bar:baz' # ] # Looks like you failed 1 test of 1. t/complete_env_elem.t ....... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests t/complete_path_env_elem.t .. 1/? # Failed test 'ba (result)' # at t/complete_path_env_elem.t line 29. # Structures begin differing at: # $got->[0] = 'foo:bar:baz' # $expected->[0] = 'bar' # [ # 'foo:bar:baz' # ] # Looks like you failed 1 test of 1. t/complete_path_env_elem.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests t/release-rinci.t ........... skipped: these tests are for release candidate testing Test Summary Report ------------------- t/complete_env_elem.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 t/complete_path_env_elem.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=7, Tests=4, 1 wallclock secs ( 0.08 usr + 0.02 sys = 0.09 CPU) Result: FAIL Failed 2/7 test programs. 2/4 subtests failed. dmake.exe: Error code 255, while making 'test_dynamic' PERLANCAR/Complete-Env-0.39.tar.gz C:\Perl\STRAWB~1\c\bin\dmake.exe test -- NOT OK //hint// to see the cpan-testers results for installing this module, try: reports PERLANCAR/Complete-Env-0.39.tar.gz Stopping: 'install' failed for 'Complete::Env'. Failed during this command: PERLANCAR/Complete-Env-0.39.tar.gz : make_test NO Show quoted text
cpan>
On Wed Apr 05 11:31:20 2017, jason@froebe.net wrote: Show quoted text
> Platform: Strawberry Perl 5.24.1.1 (64bit) Windows 10 > Complete::Env version: 0.39 > >
> cpan> install Complete::Env
> Database was generated on Tue, 04 Apr 2017 18:56:26 GMT > > Running install for module 'Complete::Env' > Checksum for > C:\Perl\STRAWB~1\cpan\sources\authors\id\P\PE\PERLANCAR\Complete-Env- > 0.39.tar.gz ok > Scanning cache C:\Perl\STRAWB~1\cpan\build for sizes > ............................................................................DONE > Configuring P/PE/PERLANCAR/Complete-Env-0.39.tar.gz with Makefile.PL > Checking if your kit is complete... > Looks good > Generating a dmake-style Makefile > Writing Makefile for Complete::Env > Writing MYMETA.yml and MYMETA.json > PERLANCAR/Complete-Env-0.39.tar.gz > C:\Perl\Strawberry\perl\bin\perl.exe Makefile.PL -- OK > Running make for P/PE/PERLANCAR/Complete-Env-0.39.tar.gz > cp lib/Complete/Env.pm blib\lib\Complete\Env.pm > PERLANCAR/Complete-Env-0.39.tar.gz > C:\Perl\STRAWB~1\c\bin\dmake.exe -- OK > Running make test > "C:\Perl\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "- > MTest::Harness" "-e" "undef *Test::Harness::Switches; > test_harness(0, 'blib\lib', 'blib\arch')" t/*.t > t/00-compile.t .............. ok > t/author-pod-coverage.t ..... skipped: these tests are for testing by > the author > t/author-pod-syntax.t ....... skipped: these tests are for testing by > the author > t/complete_env.t ............ ok > t/complete_env_elem.t ....... 1/? > # Failed test 'ba (result)' > # at t/complete_env_elem.t line 30. > # Structures begin differing at: > # $got->[0] = 'foo:bar:baz' > # $expected->[0] = 'bar' > # [ > # 'foo:bar:baz' > # ] > # Looks like you failed 1 test of 1. > t/complete_env_elem.t ....... Dubious, test returned 1 (wstat 256, > 0x100) > Failed 1/1 subtests > t/complete_path_env_elem.t .. 1/? > # Failed test 'ba (result)' > # at t/complete_path_env_elem.t line 29. > # Structures begin differing at: > # $got->[0] = 'foo:bar:baz' > # $expected->[0] = 'bar' > # [ > # 'foo:bar:baz' > # ] > # Looks like you failed 1 test of 1. > t/complete_path_env_elem.t .. Dubious, test returned 1 (wstat 256, > 0x100) > Failed 1/1 subtests > t/release-rinci.t ........... skipped: these tests are for release > candidate testing > > Test Summary Report > ------------------- > t/complete_env_elem.t (Wstat: 256 Tests: 1 Failed: 1) > Failed test: 1 > Non-zero exit status: 1 > t/complete_path_env_elem.t (Wstat: 256 Tests: 1 Failed: 1) > Failed test: 1 > Non-zero exit status: 1 > Files=7, Tests=4, 1 wallclock secs ( 0.08 usr + 0.02 sys = 0.09 > CPU) > Result: FAIL > Failed 2/7 test programs. 2/4 subtests failed. > dmake.exe: Error code 255, while making 'test_dynamic' > PERLANCAR/Complete-Env-0.39.tar.gz > C:\Perl\STRAWB~1\c\bin\dmake.exe test -- NOT OK > //hint// to see the cpan-testers results for installing this module, > try: > reports PERLANCAR/Complete-Env-0.39.tar.gz > Stopping: 'install' failed for 'Complete::Env'. > Failed during this command: > PERLANCAR/Complete-Env-0.39.tar.gz : make_test NO >
> cpan>
These two tests fail because the test string uses a colons instead of semi-colons. I have submitted a pull request (https://github.com/perlancar/perl-Complete-Env/pull/1) for this, and also attached a patch here as well.
Subject: Complete-Env_fix-tests-on-win32.diff
diff --git a/t/complete_env_elem.t b/t/complete_env_elem.t index 8567d94..c38f069 100644 --- a/t/complete_env_elem.t +++ b/t/complete_env_elem.t @@ -11,7 +11,9 @@ use Complete::Env qw(complete_env_elem); local $Complete::Common::OPT_FUZZY = 0; { - local $ENV{FOO} = 'foo:bar:baz'; + local $ENV{FOO} = $^O eq q{MSWin32} ? + 'foo;bar;baz' : 'foo:bar:baz'; + test_complete( word => 'ba', env => 'FOO', diff --git a/t/complete_path_env_elem.t b/t/complete_path_env_elem.t index 0b327a5..bcb7bae 100644 --- a/t/complete_path_env_elem.t +++ b/t/complete_path_env_elem.t @@ -11,7 +11,9 @@ use Complete::Env qw(complete_path_env_elem); local $Complete::Common::OPT_FUZZY = 0; { - local $ENV{PATH} = 'foo:bar:baz'; + local $ENV{FOO} = $^O eq q{MSWin32} ? + 'foo;bar;baz' : 'foo:bar:baz'; + test_complete( word => 'ba', result => [qw(bar baz)],
Thanks, released 0.400.
On Sat Dec 30 21:30:45 2017, PERLANCAR wrote: Show quoted text
> Thanks, released 0.400.
Glad I could help. P.S. Here is the corrected patch for anyone who needs it. Sorry for the typo.
Subject: Complete-Env_fix-tests-on-win32.diff
diff --git a/t/complete_env_elem.t b/t/complete_env_elem.t index 8567d94..c38f069 100644 --- a/t/complete_env_elem.t +++ b/t/complete_env_elem.t @@ -11,7 +11,9 @@ use Complete::Env qw(complete_env_elem); local $Complete::Common::OPT_FUZZY = 0; { - local $ENV{FOO} = 'foo:bar:baz'; + local $ENV{FOO} = $^O eq q{MSWin32} ? + 'foo;bar;baz' : 'foo:bar:baz'; + test_complete( word => 'ba', env => 'FOO', diff --git a/t/complete_path_env_elem.t b/t/complete_path_env_elem.t index 0b327a5..bcb7bae 100644 --- a/t/complete_path_env_elem.t +++ b/t/complete_path_env_elem.t @@ -11,7 +11,9 @@ use Complete::Env qw(complete_path_env_elem); local $Complete::Common::OPT_FUZZY = 0; { - local $ENV{PATH} = 'foo:bar:baz'; + local $ENV{FOO} = $^O eq q{MSWin32} ? + 'foo;bar;baz' : 'foo:bar:baz'; + test_complete( word => 'ba', result => [qw(bar baz)],
On Sat Dec 30 21:30:45 2017, PERLANCAR wrote: Show quoted text
> Thanks, released 0.400.
Glad I could help. P.S. Here is the corrected patch for anyone who needs it. Sorry for the typo.
Subject: Complete-Env_fix-tests-on-win32.diff
diff --git a/t/complete_env_elem.t b/t/complete_env_elem.t index 8567d94..c38f069 100644 --- a/t/complete_env_elem.t +++ b/t/complete_env_elem.t @@ -11,7 +11,9 @@ use Complete::Env qw(complete_env_elem); local $Complete::Common::OPT_FUZZY = 0; { - local $ENV{FOO} = 'foo:bar:baz'; + local $ENV{FOO} = $^O eq q{MSWin32} ? + 'foo;bar;baz' : 'foo:bar:baz'; + test_complete( word => 'ba', env => 'FOO', diff --git a/t/complete_path_env_elem.t b/t/complete_path_env_elem.t index 0b327a5..bcb7bae 100644 --- a/t/complete_path_env_elem.t +++ b/t/complete_path_env_elem.t @@ -11,7 +11,9 @@ use Complete::Env qw(complete_path_env_elem); local $Complete::Common::OPT_FUZZY = 0; { - local $ENV{PATH} = 'foo:bar:baz'; + local $ENV{PATH} = $^O eq q{MSWin32} ? + 'foo;bar;baz' : 'foo:bar:baz'; + test_complete( word => 'ba', result => [qw(bar baz)],