in reply to Installing of CPAN::Checksums 2.14 is not working

The test incorrectly assumes forward slashes everywhere. Maybe this part
like $cksum->{1}{cpan_path}, qr{t/tdir$}, "cpan_path is as expected" or diag explain $cksum;

should be replaced with

my $path = File::Spec->catfile('t', 'tdir'); like $cksum->{1}{cpan_path}, qr{\Q$path\E$}, "cpan_path is as expected" or diag explain $cksum;

or something similar.

Update: Oh, we already have a function for that! So the first line should be

my $path = _d"t/tdir";

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: Installing of CPAN::Checksums 2.14 is not working
by Dirk80 (Pilgrim) on Jun 01, 2022 at 13:15 UTC

    Thank you very much. You fixed this test case. Now one more seems not work. Perhaps it's a similar thing.

    C:\Strawberry\cpan\old\CPAN-Checksums-2.14.tar\CPAN-Checksums-2.14>gma +ke test "C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::H +arness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\l +ib', 'blib\arch')" t/*.t t/00signature.t .. skipped: Cannot connect to the keyserver t/52podcover.t ... ok t/pod.t .......... ok t/updatedir.t .... 8/? # Failed test 'empty dir gives also 2' # at t/updatedir.t line 62. # got: '1' # expected: '2' Could not rename: Permission denied at t/updatedir.t line 65. # Tests were run but no plan was declared and done_testing() was not s +een. # Looks like your test exited with 13 just after 21. t/updatedir.t .... Dubious, test returned 13 (wstat 3328, 0xd00) Failed 1/21 subtests Test Summary Report ------------------- t/updatedir.t (Wstat: 3328 Tests: 21 Failed: 1) Failed test: 20 Non-zero exit status: 13 Parse errors: No plan found in TAP output Files=4, Tests=23, 4 wallclock secs ( 0.03 usr + 0.11 sys = 0.14 CP +U) Result: FAIL Failed 1/4 test programs. 1/23 subtests failed. gmake: *** [Makefile:887: test_dynamic] Error 13

    Perhaps it's a similar thing. But my knowledge is not enough to fix this error. This time a return value is not as expected. I'll give my best to look deeper into it. But of course I'd be glad to get some help. Thank you!

      At the point in the test folder t/tdir (or in Windows' speak t\tdir) still exists and contains three files: 1, 2, and CHECKSUMS

      At that point, that folder is not present when testing on Linux.

      I have no idea what that test is supposed to do exactly. An inserted rmtree _d"t/tdir"; did not cause the tests to PASS. I'll leave this to the Windows' experts.


      Enjoy, Have FUN! H.Merijn