Skip to content

Commit

Permalink
Item10376: Fix test breakage... am I a regex noob?
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@11080 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
PaulHarvey authored and PaulHarvey committed Mar 15, 2011
1 parent 8163951 commit 1c229eb
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions core/lib/Foswiki/Address.pm
Expand Up @@ -466,8 +466,8 @@ sub parse {
};
}
%opts = ( %{ $this->{parseopts} }, %opts );
$path =~ s/\@([-\+]?\d+)$//;
$this->{rev} = $1;
$path =~ s/(\@([-\+]?\d+))$//;
$this->{rev} = $2;
ASSERT( defined $opts{existHints} ) if DEBUG;
ASSERT( defined $opts{existAs} ) if DEBUG;

Expand Down Expand Up @@ -546,7 +546,7 @@ sub parse {
$sepident .= $sepidentchars{$sepboost}->{$lastsep};
}
$plaus = $plausibletable{$sepident};
print "Identity\t$sepident calculated for $path, plaustable: "
print STDERR "Identity\t$sepident calculated for $path, plaustable: "
. Dumper($plaus)
if TRACE;

Expand Down Expand Up @@ -598,12 +598,13 @@ sub parse {
ASSERT( $atommap{$type} ) if DEBUG;
$typeatoms{$type} =
$atommap{$type}->( $this, {}, $path, \%opts );
print "Atomised $path as $type, result: "
print STDERR "Atomised $path as $type, result: "
. Dumper( $typeatoms{$type} )
if TRACE;
( $besttype, $score ) =
$this->_existScore( $typeatoms{$type}, $type );
print "existScore: $score, besttype: $besttype\n" if TRACE;
print STDERR "existScore: $score, besttype: $besttype\n"
if TRACE;

if ( $score
and ( not defined $bestscore or $bestscore < $score ) )
Expand Down Expand Up @@ -1346,6 +1347,7 @@ sub equiv {
if DEBUG;
if ( $this->{webs}->[$i] ne $other->{webs}->[$i] ) {
$equal = 0;
print STDERR "equiv(): web paths not equal\n" if TRACE;
}
else {
$i += 1;
Expand All @@ -1363,19 +1365,33 @@ sub equiv {
or $this->{$part} ne $other->{$part} )
{
$equal = 0;
print STDERR "equiv(): $part part not equal\n"
if TRACE;
}
}
elsif ( defined $other->{$part} ) {
$equal = 0;
print STDERR
"equiv(): $part undef in one and not the other\n"
if TRACE;
}
$i += 1;
}
}
}
elsif (TRACE) {
print STDERR "equiv(): web paths different sizes\n";
}
}
elsif (TRACE) {
print STDERR "equiv(): webs empty\n";
}
}
elsif (TRACE) {
print STDERR "equiv(): types were not equal\n";
}
if ( not $equal ) {
print "equiv(): NOT equal "
print STDERR "equiv(): NOT equal "
. Dumper($this) . " vs "
. Dumper($other) . "\n"
if TRACE;
Expand Down

0 comments on commit 1c229eb

Please sign in to comment.