|
From: <jgr...@us...> - 2003-09-09 02:39:27
|
Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1:/tmp/cvs-serv14716/UI
Modified Files:
HTML.pm
Log Message:
HTML.pm:
Fix minor bugs pointed out by the test suite.
TestHTML.tst/TestHTML.script:
Tests for magnet classified mails, showing them in the
main history list, filter for magnet classified and
non-magnet classified mails, looking at a message in
the single message view and checking the magnet use
highlighting.
With this commit we have 100% line coverage for the
HTML.pm module (and with the previous commits today
100% coverage for all shipping POPFile modules).
Index: HTML.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v
retrieving revision 1.199
retrieving revision 1.200
diff -C2 -d -r1.199 -r1.200
*** HTML.pm 8 Sep 2003 18:03:57 -0000 1.199
--- HTML.pm 9 Sep 2003 00:28:20 -0000 1.200
***************
*** 2413,2420 ****
if ( $first =~ /___HISTORY__ __ VERSION__ 1/ ) {
while ( my $line = <CACHE> ) {
! if ( !( $line =~ /__HISTORY__ __BOUNDARY__/ ) ) {
! $self->log_( "Problem in history_cache file, expecting boundary got $line" );
! last;
! }
$line = <CACHE>;
--- 2413,2417 ----
if ( $first =~ /___HISTORY__ __ VERSION__ 1/ ) {
while ( my $line = <CACHE> ) {
! last if ( !( $line =~ /__HISTORY__ __BOUNDARY__/ ) );
$line = <CACHE>;
***************
*** 2630,2634 ****
$short_subject =~ s/>/>/g;
! # If the index is known, stick it straight into the history else# go into
# the precache for merging into history when the history is viewed next
--- 2627,2631 ----
$short_subject =~ s/>/>/g;
! # If the index is known, stick it straight into the history else go into
# the precache for merging into history when the history is viewed next
***************
*** 2638,2642 ****
}
-
$self->{$cache}{$file}{bucket} = $bucket;
$self->{$cache}{$file}{reclassified} = $reclassified;
--- 2635,2638 ----
***************
*** 3041,3048 ****
if ( $filter eq '__filter__magnet' ) {
$filtered .= $self->{language__}{History_Magnet};
- } elsif ( $filter eq '__filter__no__magnet' ) {
- $filtered .= $self->{language__}{History_NoMagnet};
} else {
! $filtered = sprintf( $self->{language__}{History_Filter}, $self->{classifier__}->get_bucket_color($self->{form_}{filter}), $self->{form_}{filter} ) if ( $self->{form_}{filter} ne '' );
}
}
--- 3037,3046 ----
if ( $filter eq '__filter__magnet' ) {
$filtered .= $self->{language__}{History_Magnet};
} else {
! if ( $filter eq '__filter__no__magnet' ) {
! $filtered .= $self->{language__}{History_NoMagnet};
! } else {
! $filtered = sprintf( $self->{language__}{History_Filter}, $self->{classifier__}->get_bucket_color($self->{form_}{filter}), $self->{form_}{filter} ) if ( $self->{form_}{filter} ne '' );
! }
}
}
***************
*** 3242,3246 ****
$body .= "</select>\n";
} else {
! $body .= " ($self->{language__}{History_MagnetUsed}: " . Classifier::MailParse::splitline( $self->{history__}{$mail_file}{magnet}, 0 ) . ")";
}
}
--- 3240,3244 ----
$body .= "</select>\n";
} else {
! $body .= " ($self->{language__}{History_MagnetUsed}: " . $self->{history__}{$mail_file}{magnet} . ")";
}
}
***************
*** 3388,3392 ****
$body .= "</select>\n<input type=\"submit\" class=\"reclassifyButton\" name=\"change\" value=\"$self->{language__}{Reclassify}\" />";
} else {
! $body .= " ($self->{language__}{History_MagnetUsed}: " . Classifier::MailParse::splitline( $self->{history__}{$mail_file}{magnet} , 0) . ")";
}
}
--- 3386,3390 ----
$body .= "</select>\n<input type=\"submit\" class=\"reclassifyButton\" name=\"change\" value=\"$self->{language__}{Reclassify}\" />";
} else {
! $body .= " ($self->{language__}{History_MagnetUsed}: " . $self->{history__}{$mail_file}{magnet} . ")";
}
}
***************
*** 3461,3468 ****
$self->{classifier__}->scores('');
} else {
! $body .= sprintf( $self->{language__}{History_MagnetBecause},
$color, $bucket,
Classifier::MailParse::splitline($self->{history__}{$mail_file}{magnet},0)
! );
}
--- 3459,3466 ----
$self->{classifier__}->scores('');
} else {
! $body .= sprintf( $self->{language__}{History_MagnetBecause}, # PROFILE BLOCK START
$color, $bucket,
Classifier::MailParse::splitline($self->{history__}{$mail_file}{magnet},0)
! ); # PROFILE BLOCK STOP
}
|