Skip to content

Commit

Permalink
Fix path with no slash and bad dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
ingydotnet committed Oct 23, 2013
1 parent b9566b5 commit a6b40b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/TestML/Runtime.pm
Expand Up @@ -219,9 +219,9 @@ sub compile_testml {
die "'testml' document required but not found"
unless $self->testml;
if ($self->testml !~ /\n/) {
$self->testml =~ /(.*)\/(.*)/ or die;
$self->testml =~ /(?:(.*)\/)?(.*)/ or die;
$self->{testml} = $2;
$self->{base} = $self->base . '/' . $1;
$self->{base} .= '/' . $1 if $1;
$self->{testml} = $self->read_testml_file($self->testml);
}
$self->{function} = $self->compiler->new->compile($self->testml)
Expand Down
3 changes: 1 addition & 2 deletions t/compile.t
@@ -1,7 +1,6 @@
# BEGIN { $Pegex::Parser::Debug = 1 }
# use Test::Differences; *is = \&eq_or_diff;
use Test::Differences; *is = \&eq_or_diff;
use Test::More;
use Test::Diff;
use strict;

BEGIN {
Expand Down

0 comments on commit a6b40b2

Please sign in to comment.