From: Don Armstrong Date: Tue, 24 Apr 2007 20:05:41 +0000 (+0000) Subject: * Fix test comparsion to handle changes in HTML::Table (closes: #420048) X-Git-Tag: debian/1.18-2 X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Flibhtml-calendarmonth-perl.git;a=commitdiff_plain;h=refs%2Ftags%2Fdebian%2F1.18-2 * Fix test comparsion to handle changes in HTML::Table (closes: #420048) --- diff --git a/debian/changelog b/debian/changelog index 299b1cd..c47c3b0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -libhtml-calendarmonth-perl (1.18-2) UNRELEASED; urgency=low +libhtml-calendarmonth-perl (1.18-2) unstable; urgency=low - * NOT RELEASED YET + * Fix test comparsion to handle changes in HTML::Table (closes: #420048) * Add missing = in HTML::CalenderMonth pod (closes: #394126) - -- Don Armstrong Fri, 26 May 2006 14:57:06 -0700 + -- Don Armstrong Mon, 23 Apr 2007 17:51:26 -0700 libhtml-calendarmonth-perl (1.18-1) unstable; urgency=low diff --git a/t/20_i8n.t b/t/20_i8n.t index e59361f..adff29e 100755 --- a/t/20_i8n.t +++ b/t/20_i8n.t @@ -23,6 +23,7 @@ my $b = HTML::CalendarMonth->new( ); my $bstr = $b->as_HTML; chomp($bstr); +$bstr =~ s/\=\"(\d+)\"/=$1/g; cmp_ok($bstr, 'eq', $basque, "i8n: ($year/$month : Basque) using auto-detect"); __DATA__ 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);