X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Flibhtml-calendarmonth-perl.git;a=blobdiff_plain;f=t%2Ftestload.pm;h=63a2bb4a3335603b04c7fa8ab422b4c8c28f6433;hp=cfb25461c66926d8924f4d24788b031ab27fc30e;hb=9f90039b50545c7f5ba1cf7640b3fd122999f68c;hpb=678390060fd5f612ea6213acf47083974039c8ce diff --git a/t/testload.pm b/t/testload.pm index cfb2546..63a2bb4 100644 --- a/t/testload.pm +++ b/t/testload.pm @@ -88,8 +88,11 @@ sub check_basic_with_datetool { week_begin => $cal->[3], datetool => $datetool, ); + # Because HTML::TreeBuilder has changed a few times, this can't be exactly equal + my $gen_html = $c->as_HTML; + $gen_html =~ s/\=\"(\d+)\"/=$1/g; my $day1 = $days[$cal->[3] - 1]; - cmp_ok($c->as_HTML, 'eq', $cal->[2], + cmp_ok($gen_html, 'eq', $cal->[2], sprintf("(%d/%-02d %s 1st day) using %s", $cal->[0], $cal->[1], $day1, $method)); if ($DEBUG && $c->as_HTML ne $cal->[2]) { @@ -111,6 +114,7 @@ sub check_woy_with_datetool { ); my $ct = $cal->as_HTML; chomp $ct; + $ct =~ s/\=\"(\d+)\"/=$1/g; cmp_ok($ct, 'eq', $tc, "($year/$month week of year) using $datetool"); if ($DEBUG && $ct ne $tc) { debug_dump('Broken', $ct, 'Test Data', $tc);