Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Metabase-Fact CPAN distribution.

Report information
The Basics
Id: 59580
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Metabase-Fact

People
Owner: Nobody in particular
Requestors: IPENBURG [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.016
Fixed in: (no value)

Attachments


Subject: metabase-profile in test fails when it's path contains spaces
Download (untitled) / with headers
text/plain 328b
Executing the bin/metabase-profile script from t/user/profile.t fails when the constructed absolute path to bin/metabase-profile contains characters that need to be escaped. This is an issue on OS X where CPAN runs tests from a path like "/private/var/root/Library/Application Support/.cpan/build/Metabase- Fact-0.016-0ub_oJ"
Download (untitled) / with headers
text/plain 448b
On Tue Jul 20 22:37:05 2010, IPENBURG wrote: Show quoted text
> Executing the bin/metabase-profile script from t/user/profile.t fails > when the constructed absolute path to bin/metabase-profile contains > characters that need to be escaped. > > This is an issue on OS X where CPAN runs tests from a path like > "/private/var/root/Library/Application Support/.cpan/build/Metabase- > Fact-0.016-0ub_oJ"
Attached is a patch which fixes this issue -- Reini Urban
Subject: Metabase-Fact-0.018-t.patch
diffbk diff -u ./t/user/profile.t~ ./t/user/profile.t --- ./t/user/profile.t~ 2010-09-02 00:22:51.000000000 +0200 +++ ./t/user/profile.t 2010-10-08 13:59:38.736483200 +0200 @@ -75,10 +75,12 @@ my $cwd = Cwd::cwd(); chdir $tempdir; END { chdir $cwd } my $output_file = 'my.profile.json'; -qx/$^X $bin -o $output_file --name "JohnPublic" --email jp\@example.com --secret 3.14159/; +my $X = $^X =~ m/\s/ ? qq{"$^X"} : $^X; +$bin = $bin =~ m/\s/ ? qq{"$bin"} : $bin; +qx/$X $bin -o $output_file --name "JohnPublic" --email jp\@example.com --secret 3.14159/; ok( -r $output_file, 'created named profile file with metabase-profile' ); -qx/$^X $bin --name "JohnPublic" --email jp\@example.com --secret 3.14159/; +qx/$X $bin --name "JohnPublic" --email jp\@example.com --secret 3.14159/; ok( -r 'metabase_id.json', 'created default profile file with metabase-profile' ); my $file_guts = do { local (@ARGV,$/) = 'metabase_id.json'; <> };
Thanks. Applied and released as 0.019. I hope that fixes it!


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.