On Wednesday 02 August 2006 12:53, Will Coleda wrote: > Every single test fails because the file assumes svn instead of svk, > e.g.: > > my @cmd = qw(svn pg svn:mime-type); > @cmd = qw(svn pg svn:keywords); > > one reference is made to 'svk ls', but it's never considered as an > option to get at the meta data, just as a criteria to then try to get > the data with svn.
Wow, this test takes a while. Here's a brain-dead simple patch I wrote that seems to be working for now. -- c
=== t/distro/file_metadata.t ================================================================== --- t/distro/file_metadata.t (revision 19697) +++ t/distro/file_metadata.t (local) @@ -13,6 +13,8 @@ use Parrot::Revision; use ExtUtils::Manifest qw( maniread ); +my $cmd = -d '.svn' ? 'svn' : 'svk'; + =head1 NAME t/distro/file_metadata.t - verify file metadata matches expectations @@ -44,13 +46,13 @@ # find test files my @test_files = grep { m/\Q$test_suffix\E$/} @manifest_files; - my @cmd = qw(svn pg svn:mime-type); + my @cmd = qw(pg svn:mime-type); my $msg = "test file has 'text/plain' mime-type"; diag $msg; like( - sub{ my $r = qx(@cmd $_); chomp $r; "$_ ($r)" }->(), + sub{ my $r = qx($cmd @cmd $_); chomp $r; "$_ ($r)" }->(), qr!^$_ \(text/plain!, "$msg ($_)" ) for @test_files; @@ -62,22 +64,22 @@ KEYWORD_EXP: { diag "this may take a while..."; - my @cmd = qw(svn pg svn:mime-type); + my @cmd = qw(pg svn:mime-type); my @plain_files = grep { - my $r = qx(@cmd $_); chomp $r; + my $r = qx($cmd @cmd $_); chomp $r; $r eq 'text/plain' or $r eq q{}; } @manifest_files; chomp @plain_files; - @cmd = qw(svn pg svn:keywords); + @cmd = qw(pg svn:keywords); my $msg = "'text/plain' file has keyword expansion"; diag $msg; is( - sub{ my $r = qx(@cmd $_); chomp $r; "$_ ($r)" }->(), + sub{ my $r = qx($cmd @cmd $_); chomp $r; "$_ ($r)" }->(), "$_ (Author Date Id Revision)", "$msg ($_)" ) for @plain_files; @@ -85,7 +87,7 @@ SKIP: { - skip 'custom svn keywords not yet supported' => 1; + skip "custom $cmd keywords not yet supported" => 1; ## Copyright keyword COPYRIGHT: { my $readme = catfile( $PConfig{build_dir}, 'README' ); @@ -102,13 +104,13 @@ fail('official copyright not found') and last COPYRIGHT unless length $official_copyright; - my @cmd = qw(svn pg Copyright); + my @cmd = qw(pg Copyright); my $msg = 'Copyright property matches official copyright'; diag $msg; is( - sub{ my $r = qx(@cmd $_); chomp $r; "$_: $r" }->(), + sub{ my $r = qx($cmd @cmd $_); chomp $r; "$_: $r" }->(), "$_: $official_copyright", "$msg ($_)" ) for @manifest_files;