develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34253 - trunk/languages/markdown/t/Parrot/Test

From:
fperrad
Date:
December 22, 2008 12:59
Subject:
[svn:parrot] r34253 - trunk/languages/markdown/t/Parrot/Test
Message ID:
20081222205905.386D4CBA12@x12.develooper.com
Author: fperrad
Date: Mon Dec 22 12:59:04 2008
New Revision: 34253

Modified:
   trunk/languages/markdown/t/Parrot/Test/Markdown.pm

Log:
[Markdown] Test
- now, work with absolute pathname

Modified: trunk/languages/markdown/t/Parrot/Test/Markdown.pm
==============================================================================
--- trunk/languages/markdown/t/Parrot/Test/Markdown.pm	(original)
+++ trunk/languages/markdown/t/Parrot/Test/Markdown.pm	Mon Dec 22 12:59:04 2008
@@ -3,10 +3,6 @@
 
 package Parrot::Test::Markdown;
 
-use strict;
-
-use File::Basename;
-
 require Parrot::Test;
 
 =head1 NAME
@@ -28,6 +24,8 @@
 use strict;
 use warnings;
 
+use File::Spec;
+
 sub new {
     return bless {};
 }
@@ -50,11 +48,10 @@
         my $params = $options{params} || q{};
 
         # flatten filenames (don't use directories)
-        my $lang_fn = Parrot::Test::per_test( '.text', $count );
-        my $out_fn = Parrot::Test::per_test( '.html', $count );
-        my $src = (defined $code) ? 'languages/' . $lang_fn : q{};
+        my $lang_fn = File::Spec->rel2abs( Parrot::Test::per_test( '.text', $count ) );
+        my $out_fn = File::Spec->rel2abs( Parrot::Test::per_test( '.html', $count ) );
         my @test_prog = (
-            "$self->{parrot} languages/markdown/markdown.pbc $src",
+            "$self->{parrot} languages/markdown/markdown.pbc $lang_fn",
         );
 
         # This does not create byte code, but lua code



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About