You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(160) |
Mar
(119) |
Apr
(111) |
May
(118) |
Jun
(101) |
Jul
(304) |
Aug
(113) |
Sep
(140) |
Oct
(137) |
Nov
(87) |
Dec
(122) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(78) |
Feb
(125) |
Mar
(131) |
Apr
(59) |
May
(121) |
Jun
(166) |
Jul
(150) |
Aug
(137) |
Sep
(73) |
Oct
(58) |
Nov
(27) |
Dec
(60) |
| 2005 |
Jan
(131) |
Feb
(84) |
Mar
(36) |
Apr
(8) |
May
(28) |
Jun
(20) |
Jul
(10) |
Aug
(72) |
Sep
(76) |
Oct
(34) |
Nov
(3) |
Dec
(29) |
| 2006 |
Jan
(13) |
Feb
(92) |
Mar
(7) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(4) |
Aug
(17) |
Sep
(5) |
Oct
(2) |
Nov
(8) |
Dec
(12) |
| 2007 |
Jan
(28) |
Feb
(15) |
Mar
|
Apr
|
May
(8) |
Jun
(4) |
Jul
(5) |
Aug
(8) |
Sep
(20) |
Oct
(38) |
Nov
(65) |
Dec
(92) |
| 2008 |
Jan
(21) |
Feb
(56) |
Mar
(27) |
Apr
(174) |
May
(25) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <jgr...@us...> - 2003-07-26 21:47:14
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv18366/Classifier
Modified Files:
MailParse.pm
Log Message:
Tests for get_header, first20 and quickmagnets; fix bug in quickmagnets handling of the from address
Index: MailParse.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/MailParse.pm,v
retrieving revision 1.151
retrieving revision 1.152
diff -C2 -d -r1.151 -r1.152
*** MailParse.pm 26 Jul 2003 21:17:18 -0000 1.151
--- MailParse.pm 26 Jul 2003 21:46:59 -0000 1.152
***************
*** 1421,1425 ****
$self->{from__} = $argument if ( $self->{from__} eq '' ) ;
$prefix = 'from';
- push @{$self->{quickmagnets__}{$prefix}}, $argument if ($argument ne '');
}
--- 1421,1424 ----
***************
*** 1530,1533 ****
--- 1529,1533 ----
{
my ($line, $encoding) = @_;
+
$line =~ s/([^\r\n]{100,120} )/$1\r\n/g;
$line =~ s/([^ \r\n]{120})/$1\r\n/g;
|
|
From: <jgr...@us...> - 2003-07-26 21:17:21
|
Update of /cvsroot/popfile/engine/tests In directory sc8-pr-cvs1:/tmp/cvs-serv13069/tests Modified Files: TestMailParse.tst TestMailParse019.clr Added Files: TestMailParse015.clr TestMailParse022.cam TestMailParse022.cls TestMailParse022.msg TestMailParse022.wrd stopwords.base Log Message: Added new test files for mail parsing for handling of some HTML cases not covered in the rest of the test files; fixed various decoding bugs in MailParse along the way; new handling of tests for stopwords --- NEW FILE: TestMailParse015.clr --- <tt><b><font color="black">Return-Path</font></b>: <<b><font color="brown">wen...@ms...</font></b>><br /><b><font color="black">Received</font></b>: from <b><font color="green">vanyel</font></b>.<b><font color="green">herald</font></b>.co.uk (<b><font color="green">vanyel</font></b>.<b><font color="green">herald</font></b>.co.uk [<b><font color="green">213.38.80.6</font></b>]) by <b><font color="green">walnut.<b><font color="green">he.net</font></b></font></b> (8.8.6/8.8.2) with ESMTP id IAA29761 for <<b><font color="green">jg...@ex...</font></b>>; Fri, 24 Jan 2003 08:52:24 -0800<br /><b><font color="black">From</font></b>: <b><font color="brown">wendyoufp@<b><font color="brown">msn.com</font></b></font></b><br /><b><font color="black">Received</font></b>: from <b><font color="brown">msn.com</font></b> (nn...@ad... [<b><font color="brown">66.125.127.84</font></b>])<br /> by <b><font color="green">vanyel</font></b>.<b><font color="green">herald</font></b>.co.uk (8.9.3/8.9.3/<b><font color="black">Debian</font></b>/<b><font color="black">GNU</font></b>) with SMTP id QAA05835<br /><b><font color="black">X-Authentication-Warning</font></b>: <b><font color="green">vanyel</font></b>.<b><font color="green">herald</font></b>.co.uk: <b><font color="brown">Host</font></b> nn...@ad... [<b><font color="brown">66.125.127.84</font></b>] <b><font color="brown">claimed</font></b> to be <b><font color="brown">msn.com</font></b><br /><b><font color="black">Message-ID</font></b>: <000111d7ed07$cbd54352$146...@vy...><br /><b><font color="black">Subject</font></b>: <b><font color="brown">Mooo</font></b><br /><b><font color="black">Date</font></b>: Sat, 25 Jan 2003 02:42:48 -1100<br /><b><font color="black">MIME-Version</font></b>: 1.0<br /><b><font color="black">Content-Type</font></b>: multipart/mixed;<br /> boundary="----=_NextPart_000_00C3_68A82A2C.D7041A60"<br /><b><font color="black">X-Priority</font></b>: 3<br /><b><font color="black">X-Mailer</font></b>: <b><font color="brown">AOL</font></b> 7.0 for <b><font color="green">Windows</font></b> US sub 118<br /><b><font color="black">Importance</font></b>: <b><font color="brown">Normal</font></b><br /><b><font color="black">X-UIDL</font></b>: &Tb"!2d_!!]9M!!OK]!!<br /><br />------=_NextPart_000_00C3_68A82A2C.D7041A60<br /><b><font color="black">Content-Type</font></b>: text/html;<br /> charset="<b><font color="brown">iso-8859-1</font></b>"<br /><b><font color="black">Content-Transfer-Encoding</font></b>: base64<br /><br /><br />PGh0bWw+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KPCEtLQ0KLmNvbnRv<br />dXIgew0KCWJvcmRlcjogMnB4IGluc2V0ICM2NjAwMzM7DQoJYmFja2dyb3Vu<br />ZC1jb2xvcjogIzY5M0YzMjsNCglmb250LWZhbWlseTogdmVyZGFuYTsNCglm<br />b250LXNpemU6IDE2cHg7DQoJY29sb3I6ICNDQ0ZGMDA7DQp9DQoudGV4dCB7<br />DQoJZm9udC1mYW1pbHk6IHZlcmRhbmE7DQoJY29sb3I6ICNDQ0ZGMDA7DQoJ<br />Zm9udC1zaXplOiAxMnB4Ow0KfQ0KLS0+DQo8L3N0eWxlPg0KPC9oZWFkPg0K<br />DQo8Ym9keSBsaW5rPSIjRkZGRkZGIiBhbGluaz0iI0ZGRkZGRiIgdmxpbms9<br />IiNGRkZGRkYiPg0KPHRhYmxlIHdpZHRoPSI1NzMiIGJvcmRlcj0iMCIgYWxp<br />Z249ImNlbnRlciIgY2VsbHBhZGRpbmc9IjEwIiBjZWxsc3BhY2luZz0iMTAi<br />Pg0KICA8dHI+DQogICAgPHRkIHdpZHRoPSI1MzMiIGNsYXNzPSJjb250b3Vy<br />Ij48ZGl2IGFsaWduPSJjZW50ZXIiPg0KICAgICAgICA8dGFibGUgd2lkdGg9<br />IjEwMCUiIGJvcmRlcj0iMCIgY2VsbHNwYWNpbmc9IjAiIGNlbGxwYWRkaW5n<br />PSIwIj4NCiAgICAgICAgICA8dHI+IA0KICAgICAgICAgICAgPHRkIGNsYXNz<br />PSJ0ZXh0Ij4mbmJzcDs8L3RkPg0KICAgICAgICAgIDwvdHI+DQogICAgICAg<br />ICAgPHRyPiANCiAgICAgICAgICAgIDx0ZCBjbGFzcz0idGV4dCI+PGRpdiBh<br />bGlnbj0iY2VudGVyIj48c3Ryb25nPjxmb250IHNpemU9IjUiPkJhbm5lZCAN<br />CiAgICAgICAgICAgICAgICBFeGNsdXNpdmUgRkFSTVlBUkQgY29udGVudDwv<br />Zm9udD48L3N0cm9uZz48L2Rpdj48L3RkPg0KICAgICAgICAgIDwvdHI+DQog<br />ICAgICAgICAgPHRyPg0KICAgICAgICAgICAgPHRkIGNsYXNzPSJ0ZXh0Ij4m<br />bmJzcDs8L3RkPg0KICAgICAgICAgIDwvdHI+DQogICAgICAgICAgPHRyPiAN<br />CiAgICAgICAgICAgIDx0ZCBjbGFzcz0idGV4dCI+Jm5ic3A7PC90ZD4NCiAg<br />ICAgICAgICA8L3RyPg0KICAgICAgICAgIDx0cj4gDQogICAgICAgICAgICA8<br />dGQgY2xhc3M9InRleHQiPiA8ZGl2IGFsaWduPSJjZW50ZXIiPiANCiAgICAg<br />ICAgICAgICAgICA8ZGl2IGFsaWduPSJsZWZ0Ij4gDQogICAgICAgICAgICAg<br />ICAgICA8ZGl2IGFsaWduPSJqdXN0aWZ5Ij48Zm9udCBjb2xvcj0iI0ZGRkZG<br />RiI+IA0KICAgICAgICAgICAgICAgICAgICA8ZGl2IGFsaWduPSJsZWZ0Ij48<br />Zm9udCBzaXplPSIzIj48c3Ryb25nPldhdGNoIGFzIHRoZXNlIHdvbWFuIA0K<br />ICAgICAgICAgICAgICAgICAgICAgIGZyb20gYXJvdW5kIHRoZSB3b3JsZCBn<br />ZXQgZG93biBhbmQgZGlydHkgd2l0aCB0aGUgcGlncy4gDQogICAgICAgICAg<br />ICAgICAgICAgICAgUmlkZSB0aGUgYmxhY2sgc3RhbGxpb25zLCBhbmQgZ2V0<br />IHRoZWlyIGJ1c2ggbGlja2VkIGJ5IGxpdHRsZSANCiAgICAgICAgICAgICAg<br />ICAgICAgICB0aW1teSdzIGRvZyBGaWRvLiA8L3N0cm9uZz48L2ZvbnQ+PC9k<br />aXY+DQogICAgICAgICAgICAgICAgICAgIDwvZm9udD48L2Rpdj4NCiAgICAg<br />ICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgPC9kaXY+DQogICAg<br />ICAgICAgICAgIDxwIGFsaWduPSJsZWZ0Ij48c3Ryb25nPjxmb250IGNvbG9y<br />PSIjRkZGRkZGIiBzaXplPSIzIj5XaXRoIGEgdGVhbSANCiAgICAgICAgICAg<br />ICAgICBvZiA0NiBnaXJscywgNiBwaG90b2dyYXBoZXJzLCA0IHZpZGVvZ3Jh<br />cGhlcnMgd2Ugc2V0IG9mZiB0byBhIA0KICAgICAgICAgICAgICAgIGZhcm0g<br />d2UgaGFkIHJlbnRlZCBmcm9tIGEgbG9jYWwgZmFybWVyLiA0NSBhY3Jlcywg<br />YW5kIGFsbCB0aGUgDQogICAgICAgICAgICAgICAgcHJpdmFjeSBpbiB0aGUg<br />d29ybGQuIFRoZSBtb3N0IGJlYXV0aWZ1bCBmYXJtIGFuaW1hbHMgd2UgaGF2<br />ZSANCiAgICAgICAgICAgICAgICBldmVyIHNlZW4uIFdpdGggdGhpcyB3ZSBz<br />dGFydGVkIHNob290aW5nIHRoZSBjb250ZW50LCByYW4gbGl2ZSANCiAgICAg<br />ICAgICAgICAgICBmZWVkcyBmcm9tIG91ciBmYXJtIHRvIG91ciBtZW1iZXJz<br />LCB0b29rIHJlcXVlc3QgZm9yIHRoZSBuZXh0IA0KICAgICAgICAgICAgICAg<br />IHBob3Rvc2hvb3QuPC9mb250Pjwvc3Ryb25nPjwvcD4NCiAgICAgICAgICAg<br />ICAgPHAgYWxpZ249ImxlZnQiPjxzdHJvbmc+PGZvbnQgY29sb3I9IiNGRkZG<br />RkYiIHNpemU9IjMiPldlIGhhdmUgd2hhdCANCiAgICAgICAgICAgICAgICBv<br />dXIgbWVtYmVycyBjYWxsICZxdW90O3RoZSBtb3N0IGFsbCBhcm91bmQsIGNv<br />bnRlbnQgZmlsbGVkIGZhcm15YXJkIA0KICAgICAgICAgICAgICAgIHNpdGUg<br />b3V0IHRoZXJlJnF1b3Q7LjwvZm9udD48L3N0cm9uZz48L3A+DQogICAgICAg<br />ICAgICAgIDxwIGFsaWduPSJsZWZ0Ij48c3Ryb25nPjxmb250IGNvbG9yPSIj<br />RkZGRkZGIiBzaXplPSIzIj48YnI+DQogICAgICAgICAgICAgICAgWW91IGRv<br />bnQgaGF2ZSB0byB0YWtlIG91ciB3b3JkIGZvciBpdCwgdmlzaXQgb3VyIHNp<br />dGUgZm9yIHlvdXJzZWxmLiANCiAgICAgICAgICAgICAgICBMZXQgeW91cnNl<br />bGYgYmUgdGFrZW4gaW4gYnkgb3VyIGJlYXV0aWZ1bCB3b21hbiwgd2hvIGhh<br />dmUgYSBsb3ZlIA0KICAgICAgICAgICAgICAgIGZvciBhbmltYWxzLjwvZm9u<br />dD48L3N0cm9uZz48L3A+DQogICAgICAgICAgICAgIDxwIGFsaWduPSJsZWZ0<br />Ij48c3Ryb25nPjxmb250IGNvbG9yPSIjRkZGRkZGIiBzaXplPSIzIj48YSBo<br />cmVmPSJodHRwOi8vd3d3LmZyZWVzZXhvbnRoZXdlYi5iei9mc3cvc2Zhcm0y<br />LyI+PGZvbnQgY29sb3I9IiNDQ0ZGMDAiPkNsaWNrIA0KICAgICAgICAgICAg<br />ICAgIGhlcmU8L2ZvbnQ+PC9hPiwgYW5kIGxldCBvdXIgZ2lybHMgYW5kIGFu<br />aW1hbHMgZnVsZmlsbCB5b3VyIGZhbnRhc2llcy48L2ZvbnQ+PC9zdHJvbmc+<br />PC9wPg0KICAgICAgICAgICAgICA8cCBhbGlnbj0ibGVmdCI+PHN0cm9uZz48<br />Zm9udCBjb2xvcj0iIzk5RkYwMCIgc2l6ZT0iMyI+PGEgaHJlZj0iaHR0cDov<br />L3d3dy5mcmVlc2V4b250aGV3ZWIuYnovZnN3L3NmYXJtMi8iPmh0dHA6Ly93<br />d3cuZnJlZXNleG9udGhld2ViLmJ6L2Zzdy9zZmFybTIvPC9hPjwvZm9udD4g<br />DQogICAgICAgICAgICAgICAgPC9zdHJvbmc+IDwvcD4NCiAgICAgICAgICAg<br />ICAgPHAgYWxpZ249ImNlbnRlciI+PGZvbnQgY29sb3I9IiNGRkZGRkYiIHNp<br />emU9IjEiPjxicj4NCiAgICAgICAgICAgICAgICA8YnI+DQogICAgICAgICAg<br />ICAgICAgPGJyPg0KICAgICAgICAgICAgICAgIDxicj4NCiAgICAgICAgICAg<br />ICAgICA8YnI+DQogICAgICAgICAgICAgICAgPGJyPg0KICAgICAgICAgICAg<br />ICAgIDxmb250IHNpemU9Ii0yIiBjb2xvcj0iIzY2NjY2NiI+PGEgaHJlZj0i<br />aHR0cDovL3d3dy5mcmVlc2V4b250aGV3ZWIuYnovZnN3L3JlbSI+PGZvbnQg<br />Y29sb3I9IiM2NjY2NjYiPkNsaWNrIA0KICAgICAgICAgICAgICAgIGhlcmU8<br />L2ZvbnQ+PC9hPiB0byByZW1vdmUgeW91cnNlbGYgZnJvbSBvdXIgbGlzdC48<br />L2ZvbnQ+PGJyPg0KICAgICAgICAgICAgICAgIDxicj4NCiAgICAgICAgICAg<br />ICAgPC9wPg0KICAgICAgICAgICAgICA8L3RkPg0KICAgICAgICAgIDwvdHI+<br />DQogICAgICAgIDwvdGFibGU+DQogICAgICA8L2Rpdj48L3RkPg0KICA8L3Ry<br />Pg0KPC90YWJsZT4NCjwvYm9keT4NCjwvaHRtbD4=<br />------=_NextPart_000_00C3_68A82A2C.D7041A60--<br /><b>Found in encoded data:</b> <b><font color="brown"><a title="html:comment"><!--.contour { border: 2px inset #660033; background-color: #693F32; font-family: verdana; font-size: 16px; color: #CCFF00;}.text { font-family: verdana; color: #CCFF00; font-size: 12px;}--></a></font></b> <b><font color="green"><a title="html:td">td</a></font></b> <b><font color="green"><a title="html:td">td</a></font></b> <b><font color="green"><a title="html:td">td</a></font></b> <b><font color="black"><a title="html:fontsize5">size="5"</a></font></b> <font color="black">Banned</font> <font color="green">Exclusive</font> <font color="black">FARMYARD</font> <font color="green">content</font> <b><font color="green"><a title="html:td">td</a></font></b> <b><font color="green"><a title="html:td">td</a></font></b> <b><font color="green"><a title="html:td">td</a></font></b> <font color="green">#FFFFFF</font> <b><font color="black"><a title="html:fontcolor#FFFFFF">color="#FFFFFF"</a></font></b> <b><font color="black"><a title="html:fontsize3">size="3"</a></font></b> <b><font color="brown"><a title="trick:invisibleink">Watch as these woman from around the world get down and dirty with the pigs. Ride the black stallions, and get their bush licked by little timmy's dog Fido. </a></font></b> <font color="green">#FFFFFF</font> <b><font color="black"><a title="html:fontcolor#FFFFFF">color="#FFFFFF"</a></font></b> <b><font color="black"><a title="html:fontsize3">size="3"</a></font></b> <b><font color="brown"><a title="trick:invisibleink">With a team of 46 girls, 6 photographers, 4 videographers we set off to a farm we had rented from a local farmer. 45 acres, and all the privacy in the world. The most beautiful farm animals we have ever seen. With this we started shooting the content, ran live feeds from our farm to our members, took request for the next photoshoot.</a></font></b> <font color="green">#FFFFFF</font> <b><font color="black"><a title="html:fontcolor#FFFFFF">color="#FFFFFF"</a></font></b> <b><font color="black"><a title="html:fontsize3">size="3"</a></font></b> <b><font color="brown"><a title="trick:invisibleink">We have what our members call "the most all around, content filled farmyard site out there".</a></font></b> <font color="green">#FFFFFF</font> <b><font color="black"><a title="html:fontcolor#FFFFFF">color="#FFFFFF"</a></font></b> <b><font color="black"><a title="html:fontsize3">size="3"</a></font></b> <b><font color="brown"><a title="trick:invisibleink"> You dont have to take our word for it, visit our site for yourself. Let yourself be taken in by our beautiful woman, who have a love for animals.</a></font></b> <font color="green">#FFFFFF</font> <b><font color="black"><a title="html:fontcolor#FFFFFF">color="#FFFFFF"</a></font></b> <b><font color="black"><a title="html:fontsize3">size="3"</a></font></b> <font color="black">www.freesexontheweb.bz</font> <font color="black">freesexontheweb.bz</font> <font color="black">#CCFF00</font> <b><font color="black"><a title="html:fontcolor#CCFF00">color="#CCFF00"</a></font></b> <font color="green">Click</font> <font color="green">here</font> <font color="green">let</font> <font color="brown">girls</font> <font color="black">animals</font> <font color="black">fulfill</font> <font color="black">fantasies</font> <font color="black">#99FF00</font> <b><font color="black"><a title="html:fontcolor#99FF00">color="#99FF00"</a></font></b> <b><font color="black"><a title="html:fontsize3">size="3"</a></font></b> <font color="black">www.freesexontheweb.bz</font> <font color="black">freesexontheweb.bz</font> <font color="black">freesexontheweb</font> <font color="black">fsw</font> <font color="black">sfarm</font> <font color="green">#FFFFFF</font> <b><font color="black"><a title="html:fontcolor#FFFFFF">color="#FFFFFF"</a></font></b> <b><font color="black"><a title="html:fontsize1">size="1"</a></font></b> <b><font color="black"><a title="html:fontsize-2">size="-2"</a></font></b> <font color="green">#666666</font> <b><font color="black"><a title="html:fontcolor#666666">color="#666666"</a></font></b> <font color="black">www.freesexontheweb.bz</font> <font color="black">freesexontheweb.bz</font> <font color="green">#666666</font> <b><font color="black"><a title="html:fontcolor#666666">color="#666666"</a></font></b> <font color="green">Click</font> <font color="green">here</font> <font color="green">remove</font> <font color="brown">yourself</font> <font color="green">list</font> </tt> --- NEW FILE: TestMailParse022.cls --- spam --- NEW FILE: TestMailParse022.wrd --- bodybackground.com 1 characters 1 from:test.com 1 from:te...@te... 1 header:From 1 header:Subject 1 header:To 1 html:imgheight456 1 html:imgwidth123 1 html:td 1 image 1 outthere.com 1 so...@ou... 1 subject:parts 1 subject:test 1 subject:various 1 tablebackground.com 1 tdbackground.com 1 to:so...@so... 1 to:somewhere.com 1 www.bodybackground.com 1 www.tablebackground.com 1 www.tdbackground.com 1 bodysound.com 1 www.bodysound.com 1 --- NEW FILE: stopwords.base --- var localhost jun head width you fri src did tbody cst cdt acronym helvetica basefont pst are colgroup pdt htm https smtp dir the would her div path font overlay mailto strike tab thu bgcolor center area frame height address table ask cite have base lang feb went big thead script listing all title esmtp www jan meta alt return xmp sep mon link mail http was from does cgi that being going sub html embed net code blockquote subject cellspacing multicol this sun col com sup aug its org map dec helo mar img wbr samp had will done del and received may tfoot encoding oct iframe message with has noframes caption ltd your spot align mbox having doing him menu abbrev any can form inc valign marquee his nobr sans range for color dfn yes yet goes ins could she span were textflow body not status nov bgsound small also blink applet gmt serif kbd est fig math edt tue edu textarea gone sat frameset person border wed apr charset nbsp banner strong pre etc input off param it's date but our plaintext out select been author isindex jul spacer note Index: TestMailParse.tst =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestMailParse.tst,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** TestMailParse.tst 18 Jul 2003 05:09:42 -0000 1.12 --- TestMailParse.tst 26 Jul 2003 21:17:19 -0000 1.13 *************** *** 7,10 **** --- 7,13 ---- # --------------------------------------------------------------------------------------------- + unlink 'stopwords'; + `cp stopwords.base stopwords`; + use Classifier::MailParse; use Classifier::Bayes; *************** *** 155,161 **** --- 158,169 ---- if ( /(.+) (\d+)/ ) { test_assert_equal( $cl->{words__}{$1}, $2, "$words $1 $2" ); + delete $cl->{words__}{$1}; } } close WORDS; + + foreach my $missed (keys %{$cl->{words__}}) { + test_assert( 0, "$missed $cl->{words__}{$missed} missing in $words" ); + } } *************** *** 181,185 **** # Test colorization ! my @color_tests = ( 'TestMailParse019.msg' ); for my $color_test (@color_tests) { --- 189,193 ---- # Test colorization ! my @color_tests = ( 'TestMailParse015.msg', 'TestMailParse019.msg' ); for my $color_test (@color_tests) { *************** *** 197,201 **** test_assert_equal( $check, $html ); } - # test decode_string --- 205,208 ---- Index: TestMailParse019.clr =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestMailParse019.clr,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestMailParse019.clr 13 Jul 2003 02:40:35 -0000 1.2 --- TestMailParse019.clr 26 Jul 2003 21:17:19 -0000 1.3 *************** *** 1 **** ! <tt><b><font color="black">Return-Path</font></b>: <<b><font color="black">bu...@dr...</font></b>><br /><b><font color="black">Delivered-To</font></b>: run@<b><font color="black">mail</font></b>.<b><font color="black">tepkom</font></b>.ru<br /><b><font color="black">Received</font></b>: by <b><font color="black">mail</font></b>.<b><font color="black">tepkom</font></b>.ru (<b><font color="black">Postfix</font></b>)<br /> id 70071971F2; <b><font color="black">Wed</font></b>, 29 <b><font color="black">Jan</font></b> 2003 20:30:49 +0300 (<b><font color="black">MSK</font></b>)<br /><b><font color="black">Delivered-To</font></b>: rescuebre@<b><font color="black">tepkom</font></b>.ru<br /><b><font color="black">Received</font></b>: <b><font color="black">from</font></b> <b><font color="black">localhost</font></b> (<b><font color="black">localhost</font></b> [<b><font color="brown">127.0.0.1</font></b>])<br /> by <b><font color="black">mail</font></b>.<b><font color="black">tepkom</font></b>.ru (<b><font color="black">Postfix</font></b>) <b><font color="black">with</font></b> <b><font color="black">SMTP</font></b><br /> id 6474D971FA; <b><font color="black">Wed</font></b>, 29 <b><font color="black">Jan</font></b> 2003 20:30:49 +0300 (<b><font color="black">MSK</font></b>)<br /><b><font color="black">Received</font></b>: <b><font color="black">from</font></b> <b><font color="black">keymaster.<b><font color="black">relativity.com</font></b></font></b> (<b><font color="black">keymaster.<b><font color="black">relativity.com</font></b></font></b> [<b><font color="black">12.146.171.10</font></b>])<br /> by <b><font color="black">mail</font></b>.<b><font color="black">tepkom</font></b>.ru (<b><font color="black">Postfix</font></b>) <b><font color="black">with</font></b> <b><font color="black">ESMTP</font></b><br /> id 93510971F2; <b><font color="black">Wed</font></b>, 29 <b><font color="black">Jan</font></b> 2003 20:30:47 +0300 (<b><font color="black">MSK</font></b>)<br /><b><font color="black">Received</font></b>: <b><font color="black">from</font></b> <b><font color="black">rtfm</font></b> (<b><font color="black">rtfm.<b><font color="black">relativity.com</font></b></font></b> [<b><font color="black">63.100.138.144</font></b>]) by <b><font color="black">keymaster.<b><font color="black">relativity.com</font></b></font></b> <b><font color="black">with</font></b> <b><font color="black">SMTP</font></b> (<b><font color="green">Microsoft</font></b> <b><font color="green">Exchange</font></b> <b><font color="brown">Internet</font></b> <b><font color="black">Mail</font></b> <b><font color="green">Service</font></b> <b><font color="brown">Version</font></b> 5.5.2653.13)<br /> id D4Z7<b><font color="black">ASMC</font></b>; <b><font color="black">Wed</font></b>, 29 <b><font color="black">Jan</font></b> 2003 12:28:21 -0500<br /><b><font color="black">To</font></b>: <b><font color="black">elia@<b><font color="black">tepkom.ru</font></b></font></b>, <b><font color="black">rescuebre@<b><font color="black">tepkom.ru</font></b></font></b>, <b><font color="black">kcruz@<b><font color="black">relativity.com</font></b></font></b>, <b><font color="black">bugtracker@<b><font color="black">relativity.com</font></b></font></b><br /><b><font color="black">Date</font></b>: <b><font color="black">Wed</font></b>, 29 <b><font color="black">Jan</font></b> 03 12:28:29<br /><b><font color="black">From</font></b>: <<b><font color="black">bugs@<b><font color="black">drunin.net</font></b></font></b>><br /><b><font color="black">Subject</font></b>: VI ID: 24149 <b><font color="black">Status</font></b>: <b><font color="black">Dev</font></b> <b><font color="black">Confirmed</font></b> <b><font color="black">Fix</font></b> <b><font color="black">Sev</font></b>: 1<br /><b><font color="black">MIME-Version</font></b>: 1.0<br /><b><font color="black">Content-Type</font></b>: multipart/mixed; boundary="isboundary"<br /><b><font color="black">Message-Id</font></b>: <200...@ma...><br /><b><font color="black">X-Text-Classification</font></b>: lists<br /><b><font color="black">X-POPFile-Link</font></b>: <<b><font color="black">http</font></b>://<b><font color="brown">127.0.0.1</font></b>:8080/<b><font color="black">jump</font></b>_to_<b><font color="black">message</font></b>?view=popfile523=1.<b><font color="black">msg</font></b>><br /><br />--isboundary<br /><b><font color="black">Content-Type</font></b>: text/html; charset=<b><font color="green">us-ascii</font></b><br /><br /><HTML><HEAD><br /><BODY><br /><DIV><B><FONT size=4><b><font color="black">Visual</font></b> <b><font color="black">Intercept</font></b> <b><font color="black">Notification</font></b>:</FONT></B></DIV><BR><br /><TABLE border rules=groups><br /> <TBODY><br /> <TR><br /> <TD><B><b><font color="black">Incident</font></b>:</B></TD><br /> <TD><br /> <A href="http://<b><font color="black">rtfm.<b><font color="black">relativity.com</font></b></font></b>/VIWeb/default.asp?type=incident&name=24149">24149</A><br /> (<A href="http://<b><font color="black">vi.<b><font color="black">relativity.com</font></b></font></b>/VIWeb/default.asp?type=incident&name=24149"><b><font color="brown">Alternative</font></b> <br /><b><font color="brown">server</font></b></A>)<br /> </TD><br /> <TD WIDTH="20%"><TD><TD><TD></TR><br /> <TBODY><br /> <TR><br /> <TD><B><b><font color="black">Subject</font></b>:</B></TD><br /> <TD COLSPAN=5><b><font color="black">Internal</font></b> <b><font color="brown">error</font></b> in <b><font color="black">BRE</font></b>.<b><font color="brown">dll</font></b></TD></TR><br /> <TBODY><br /> <TR><br /> <TD><B><b><font color="brown">Project</font></b>:</B></TD><br /> <TD COLSPAN=5>/<b><font color="green">Program</font></b>/RW/<b><font color="black">Cobol</font></b>/<b><font color="black">BRE</font></b>/<b><font color="brown">Structure</font></b> <b><font color="green">Based</font></b></TD></TR><br /> <TR><br /> <TD><B><b><font color="brown">Version</font></b>:</B></TD><br /> <TD COLSPAN=5>7.1.00</TD></TR><br /> <TR><br /> <TD><B><b><font color="black">Release</font></b>:</B></TD><br /> <TD COLSPAN=5></TD></TR><br /> <TR><br /> <TD><B><b><font color="brown">Build</font></b>:</B></TD><br /> <TD COLSPAN=5></TD></TR><br /> <TBODY><br /> <TR><br /> <TD><B><b><font color="green">Customer</font></b>:</B></TD><br /> <TD COLSPAN=5><b><font color="black">INTERNAL</font></b></TD></TR><br /> <TBODY><br /> <TR><br /> <TD><B><b><font color="black">Status</font></b>:</B></TD><br /> <TD><b><font color="brown">Dev</font></b> <b><font color="brown">Confirmed</font></b> <b><font color="black">Fix</font></b></TD><TD><br /> <TD><B><b><font color="black">AssignID</font></b>:</B></TD><br /> <TD><b><font color="black">snd</font></b></TD><br /> <TD>1/29/2003 10:16:01 AM</TD></TR><br /> <TR><br /> <TD><B><b><font color="black">Priority</font></b>:</B></TD><br /> <TD><b><font color="brown">High</font></b></TD><TD><br /> <TD><B><b><font color="black">RequestID</font></b>:</B></TD><br /> <TD><b><font color="black">elia</font></b></TD><br /> <TD>1/29/2003 10:16:01 AM</TD></TR><br /> <TR><br /> <TD><B><b><font color="black">Severity</font></b>:</B></TD><br /> <TD>1</TD><TD><br /> <TD><B><b><font color="black">QAID</font></b>:</B></TD><br /> <TD><b><font color="black">elia</font></b></TD><br /> <TD>1/29/2003 10:16:01 AM</TD></TR><br /> <TR><br /> <TD><B><b><font color="black">Category</font></b>:</B></TD><br /> <TD><b><font color="black">BRE</font></b></TD><TD><br /> <TD><B><b><font color="black">ChangeID</font></b>:</B></TD><br /> <TD><b><font color="black">snd</font></b></TD><br /> <TD>1/29/2003 12:26:59 PM</TD></TR><br /> <TBODY><br /> <TR><br /> <TD vAlign=top><B><b><font color="brown">Description</font></b>:</B></TD><br /> <TD COLSPAN=5><TEXTAREA READONLY ROWS=10 COLS=60><b><font color="black">FROM</font></b>:<b><font color="black">elia</font></b> <b><font color="black">DATE</font></b>:01/29/2003 10:16:01 <br /><br /> <b><font color="black">The</font></b> "<b><font color="black">Internal</font></b> <b><font color="brown">error</font></b> in <b><font color="black">BRE</font></b>.<b><font color="brown">dll</font></b>" <b><font color="black">message</font></b> is <b><font color="black">generated</font></b> <b><font color="green">when</font></b> <b><font color="brown">structure</font></b> <b><font color="green">based</font></b> <b><font color="black">slice</font></b><br /> is <b><font color="black">extracted</font></b> <b><font color="black">from</font></b> <b><font color="green">program</font></b> <b><font color="brown">which</font></b> <b><font color="black">has</font></b> <b><font color="black">been</font></b> <b><font color="black">verified</font></b> <b><font color="black">with</font></b> "<b><font color="green">Perform</font></b> <b><font color="green">Program</font></b> <b><font color="green">analysis</font></b> = no"<br /> <b><font color="black">and</font></b> at <b><font color="black">the</font></b> <b><font color="green">same</font></b> <b><font color="green">time</font></b> <b><font color="black">BRE</font></b> <b><font color="brown">option</font></b> "<b><font color="green">Ensure</font></b> <b><font color="black">consistent</font></b> <b><font color="green">access</font></b> to <b><font color="black">external</font></b> <b><font color="brown">resources</font></b> = <b><font color="black">yes</font></b>".<br /><br /> <b><font color="black">The</font></b> <b><font color="black">correct</font></b> <b><font color="brown">error</font></b> <b><font color="black">message</font></b> <b><font color="green">should</font></b> be <b><font color="black">generated</font></b>.<br /><br /> "<b><font color="brown">Severe</font></b> Re-<b><font color="black">verify</font></b> <b><font color="black">the</font></b> <b><font color="green">program</font></b> <b><font color="black">with</font></b> '<b><font color="green">Perform</font></b> <b><font color="green">program</font></b> <b><font color="black">analysis'</font></b> <b><font color="brown">option</font></b> <b><font color="green">set</font></b>".<br /><br /><br /> <b><font color="black">Test</font></b>:MEDIUM\\RescueWin\archives\VS-cobol\Computation\<b><font color="black">Logical</font></b>-path\<b><font color="green">CALL</font></b>-accept4.<b><font color="black">CBL</font></b> <br /><br /> *|<b><font color="green">Start</font></b> <b><font color="brown">paragraph</font></b>: p1<br /> *|<b><font color="brown">Last</font></b> <b><font color="brown">paragraph</font></b>: p1<br /><br /> 1015 <b><font color="green">blue</font></b>.<br /><br /><b><font color="black">FROM</font></b>:<b><font color="black">snd</font></b> <b><font color="black">DATE</font></b>:<b><font color="green">Wednesday</font></b>, <b><font color="green">January</font></b> 29, 2003 11:52:45 AM <br /><br /><b><font color="green">Fixed</font></b> in <b><font color="green">Blue</font></b>. No <b><font color="black">warning</font></b> in <b><font color="black">this</font></b> <b><font color="green">case</font></b>, <b><font color="black">BRE</font></b> <b><font color="black">runs</font></b> <b><font color="black">DFA</font></b> <b><font color="black">instead</font></b>.<br /></TEXTAREA></TD></TR><br /> <TR><br /> <TD vAlign=top><B><b><font color="black">Resolution</font></b>:</B></TD><br /> <TD COLSPAN=5><TEXTAREA READONLY ROWS=10 COLS=60></TEXTAREA></TD></TR><br /> <TR><br /> <TD vAlign=top><B><b><font color="black">WorkAround</font></b>:</B></TD><br /> <TD COLSPAN=5><TEXTAREA READONLY ROWS=10 COLS=60></TEXTAREA></TD></TR></TBODY></TABLE><br /><HR><br />If <b><font color="black">you</font></b> <b><font color="black">have</font></b> <b><font color="black">received</font></b> <b><font color="black">this</font></b> <b><font color="green">email</font></b> in <b><font color="brown">error</font></b>, <b><font color="green">please</font></b> <b><font color="black">respond</font></b> to: <A <br />href="mailto:BugTracker@<b><font color="black">relativity.com</font></b>">Bug...@re...</A> <br /><HR><br /></BODY></HTML><br /><br />--isboundary--<br /><br /><br /></tt> \ No newline at end of file --- 1,3 ---- ! <tt><b><font color="black">Return-Path</font></b>: <<b><font color="black">bu...@dr...</font></b>><br /><b><font color="black">Delivered-To</font></b>: run@mail.<b><font color="black">tepkom</font></b>.ru<br /><b><font color="black">Received</font></b>: by mail.<b><font color="black">tepkom</font></b>.ru (<b><font color="black">Postfix</font></b>)<br /> id 70071971F2; Wed, 29 Jan 2003 20:30:49 +0300 (<b><font color="black">MSK</font></b>)<br /><b><font color="black">Delivered-To</font></b>: rescuebre@<b><font color="black">tepkom</font></b>.ru<br /><b><font color="black">Received</font></b>: from localhost (localhost [<b><font color="brown">127.0.0.1</font></b>])<br /> by mail.<b><font color="black">tepkom</font></b>.ru (<b><font color="black">Postfix</font></b>) with SMTP<br /> id 6474D971FA; Wed, 29 Jan 2003 20:30:49 +0300 (<b><font color="black">MSK</font></b>)<br /><b><font color="black">Received</font></b>: from <b><font color="black">keymaster.<b><font color="black">relativity.com</font></b></font></b> (<b><font color="black">keymaster.<b><font color="black">relativity.com</font></b></font></b> [<b><font color="black">12.146.171.10</font></b>])<br /> by mail.<b><font color="black">tepkom</font></b>.ru (<b><font color="black">Postfix</font></b>) with ESMTP<br /> id 93510971F2; Wed, 29 Jan 2003 20:30:47 +0300 (<b><font color="black">MSK</font></b>)<br /><b><font color="black">Received</font></b>: from <b><font color="black">rtfm</font></b> (<b><font color="black">rtfm.<b><font color="black">relativity.com</font></b></font></b> [<b><font color="black">63.100.138.144</font></b>]) by <b><font color="black">keymaster.<b><font color="black">relativity.com</font></b></font></b> with SMTP (<b><font color="green">Microsoft</font></b> <b><font color="green">Exchange</font></b> <b><font color="brown">Internet</font></b> Mail <b><font color="green">Service</font></b> <b><font color="brown">Version</font></b> 5.5.2653.13)<br /> id D4Z7<b><font color="black">ASMC</font></b>; Wed, 29 Jan 2003 12:28:21 -0500<br /><b><font color="black">To</font></b>: <b><font color="black">elia@<b><font color="black">tepkom.ru</font></b></font></b>, <b><font color="black">rescuebre@<b><font color="black">tepkom.ru</font></b></font></b>, <b><font color="black">kcruz@<b><font color="black">relativity.com</font></b></font></b>, <b><font color="black">bugtracker@<b><font color="black">relativity.com</font></b></font></b><br /><b><font color="black">Date</font></b>: Wed, 29 Jan 03 12:28:29<br /><b><font color="black">From</font></b>: <<b><font color="black">bugs@<b><font color="black">drunin.net</font></b></font></b>><br /><b><font color="black">Subject</font></b>: VI ID: 24149 Status: <b><font color="black">Dev</font></b> <b><font color="black">Confirmed</font></b> <b><font color="black">Fix</font></b> <b><font color="black">Sev</font></b>: 1<br /><b><font color="black">MIME-Version</font></b>: 1.0<br /><b><font color="black">Content-Type</font></b>: multipart/mixed; boundary="isboundary"<br /><b><font color="black">Message-Id</font></b>: <200...@ma...><br /><b><font color="black">X-Text-Classification</font></b>: lists<br /><b><font color="black">X-POPFile-Link</font></b>: <http://<b><font color="brown">127.0.0.1</font></b>:8080/<b><font color="black">jump</font></b>_to_message?view=popfile523=1.<b><font color="black">msg</font></b>><br /><br />--isboundary<br /><b><font color="black">Content-Type</font></b>: text/html; charset=<b><font color="green">us-ascii</font></b><br /><br /><HTML><HEAD><br /><BODY><br /><DIV><B><FONT size=4><b><font color="black">Visual</font></b> <b><font color="black">Intercept</font></b> <b><font color="black">Notification</font></b>:</FONT></B></DIV><BR><br /><TABLE border rules=groups><br /> <TBODY><br /> <TR><br /> <TD><B><b><font color="black">Incident</font></b>:</B></TD><br /> <TD><br /> <A href="http://<b><font color="black">rtfm.<b><font color="black">relativity.com</font></b></font></b>/VIWeb/default.asp?type=incident&name=24149">24149</A><br /> (<A href="http://<b><font color="black">vi.<b><font color="black">relativity.com</font></b></font></b>/VIWeb/default.asp?type=incident&name=24149"><b><font color="brown">Alternative</font></b> <br /><b><font color="brown">server</font></b></A>)<br /> </TD><br /> <TD WIDTH="20%"><TD><TD><TD></TR><br /> <TBODY><br /> <TR><br /> <TD><B>Subject:</B></TD><br /> <TD COLSPAN=5><b><font color="black">Internal</font></b> <b><font color="brown">error</font></b> in <b><font color="black">BRE</font></b>.<b><font color="brown">dll</font></b></TD></TR><br /> <TBODY><br /> <TR><br /> <TD><B><b><font color="brown">Project</font></b>:</B></TD><br /> <TD COLSPAN=5>/<b><font color="green">Program</font></b>/RW/<b><font color="black">Cobol</font></b>/<b><font color="black">BRE</font></b>/<b><font color="brown">Structure</font></b> <b><font color="green">Based</font></b></TD></TR><br /> <TR><br /> <TD><B><b><font color="brown">Version</font></b>:</B></TD><br /> <TD COLSPAN=5>7.1.00</TD></TR><br /> <TR><br /> <TD><B><b><font color="black">Release</font></b>:</B></TD><br /> <TD COLSPAN=5></TD></TR><br /> <TR><br /> <TD><B><b><font color="brown">Build</font></b>:</B></TD><br /> <TD COLSPAN=5></TD></TR><br /> <TBODY><br /> <TR><br /> <TD><B><b><font color="green">Customer</font></b>:</B></TD><br /> <TD COLSPAN=5><b><font color="black">INTERNAL</font></b></TD></TR><br /> <TBODY><br /> <TR><br /> <TD><B>Status:</B></TD><br /> <TD><b><font color="brown">Dev</font></b> <b><font color="brown">Confirmed</font></b> <b><font color="black">Fix</font></b></TD><TD><br /> <TD><B><b><font color="black">AssignID</font></b>:</B></TD><br /> <TD><b><font color="black">snd</font></b></TD><br /> <TD>1/29/2003 10:16:01 AM</TD></TR><br /> <TR><br /> <TD><B><b><font color="black">Priority</font></b>:</B></TD><br /> <TD><b><font color="brown">High</font></b></TD><TD><br /> <TD><B><b><font color="black">RequestID</font></b>:</B></TD><br /> <TD><b><font color="black">elia</font></b></TD><br /> <TD>1/29/2003 10:16:01 AM</TD></TR><br /> <TR><br /> <TD><B><b><font color="black">Severity</font></b>:</B></TD><br /> <TD>1</TD><TD><br /> <TD><B><b><font color="black">QAID</font></b>:</B></TD><br /> <TD><b><font color="black">elia</font></b></TD><br /> <TD>1/29/2003 10:16:01 AM</TD></TR><br /> <TR><br /> <TD><B><b><font color="black">Category</font></b>:</B></TD><br /> <TD><b><font color="black">BRE</font></b></TD><TD><br /> <TD><B><b><font color="black">ChangeID</font></b>:</B></TD><br /> <TD><b><font color="black">snd</font></b></TD><br /> <TD>1/29/2003 12:26:59 PM</TD></TR><br /> <TBODY><br /> <TR><br /> <TD vAlign=top><B><b><font color="brown">Description</font></b>:</B></TD><br /> <TD COLSPAN=5><TEXTAREA READONLY ROWS=10 COLS=60>FROM:<b><font color="black">elia</font></b> DATE:01/29/2003 10:16:01 <br /><br /> The "<b><font color="black">Internal</font></b> <b><font color="brown">error</font></b> in <b><font color="black">BRE</font></b>.<b><font color="brown">dll</font></b>" message is <b><font color="black">generated</font></b> <b><font color="green">when</font></b> <b><font color="brown">structure</font></b> <b><font color="green">based</font></b> <b><font color="black">slice</font></b><br /> is <b><font color="black">extracted</font></b> from <b><font color="green">program</font></b> <b><font color="brown">which</font></b> has been <b><font color="black">verified</font></b> with "<b><font color="green">Perform</font></b> <b><font color="green">Program</font></b> <b><font color="green">analysis</font></b> = no"<br /> and at the <b><font color="green">same</font></b> <b><font color="green">time</font></b> <b><font color="black">BRE</font></b> <b><font color="brown">option</font></b> "<b><font color="green">Ensure</font></b> <b><font color="black">consistent</font></b> <b><font color="green">access</font></b> to <b><font color="black">external</font></b> <b><font color="brown">resources</font></b> = yes".<br /><br /> The <b><font color="black">correct</font></b> <b><font color="brown">error</font></b> message <b><font color="green">should</font></b> be <b><font color="black">generated</font></b>.<br /><br /> "<b><font color="brown">Severe</font></b> Re-<b><font color="black">verify</font></b> the <b><font color="green">program</font></b> with '<b><font color="green">Perform</font></b> <b><font color="green">program</font></b> <b><font color="black">analysis'</font></b> <b><font color="brown">option</font></b> <b><font color="green">set</font></b>".<br /><br /><br /> <b><font color="black">Test</font></b>:MEDIUM\\RescueWin\archives\VS-cobol\Computation\<b><font color="black">Logical</font></b>-path\<b><font color="green">CALL</font></b>-accept4.<b><font color="black">CBL</font></b> <br /><br /> *|<b><font color="green">Start</font></b> <b><font color="brown">paragraph</font></b>: p1<br /> *|<b><font color="brown">Last</font></b> <b><font color="brown">paragraph</font></b>: p1<br /><br /> 1015 <b><font color="green">blue</font></b>.<br /><br />FROM:<b><font color="black">snd</font></b> DATE:<b><font color="green">Wednesday</font></b>, <b><font color="green">January</font></b> 29, 2003 11:52:45 AM <br /><br /><b><font color="green">Fixed</font></b> in <b><font color="green">Blue</font></b>. No <b><font color="black">warning</font></b> in this <b><font color="green">case</font></b>, <b><font color="black">BRE</font></b> <b><font color="black">runs</font></b> <b><font color="black">DFA</font></b> <b><font color="black">instead</font></b>.<br /></TEXTAREA></TD></TR><br /> <TR><br /> <TD vAlign=top><B><b><font color="black">Resolution</font></b>:</B></TD><br /> <TD COLSPAN=5><TEXTAREA READONLY ROWS=10 COLS=60></TEXTAREA></TD></TR><br /> <TR><br /> <TD vAlign=top><B><b><font color="black">WorkAround</font></b>:</B></TD><br /> <TD COLSPAN=5><TEXTAREA READONLY ROWS=10 COLS=60></TEXTAREA></TD></TR></TBODY></TABLE><br /><HR><br />If you have received this <b><font color="green">email</font></b> in <b><font color="brown">error</font></b>, <b><font color="green">please</font></b> <b><font color="black">respond</font></b> to: <A <br />href="mailto:BugTracker@<b><font color="black">relativity.com</font></b>">Bug...@re...</A> <br /><HR><br /></BODY></HTML><br /><br />--isboundary--<br /><br /><br /></tt> ! ! |
|
From: <jgr...@us...> - 2003-07-26 21:17:21
|
Update of /cvsroot/popfile/engine/Test
In directory sc8-pr-cvs1:/tmp/cvs-serv13069/Test
Modified Files:
SimpleProxy.pm
Log Message:
Added new test files for mail parsing for handling of some HTML cases not covered in the rest of the test files; fixed various decoding bugs in MailParse along the way; new handling of tests for stopwords
Index: SimpleProxy.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Test/SimpleProxy.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** SimpleProxy.pm 26 Jul 2003 18:28:28 -0000 1.8
--- SimpleProxy.pm 26 Jul 2003 21:17:18 -0000 1.9
***************
*** 186,190 ****
}
! close $remote;
close $pipe;
--- 186,190 ----
}
! close $remote if ( defined( $remote ) );
close $pipe;
|
|
From: <jgr...@us...> - 2003-07-26 21:17:21
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv13069/Classifier
Modified Files:
MailParse.pm
Log Message:
Added new test files for mail parsing for handling of some HTML cases not covered in the rest of the test files; fixed various decoding bugs in MailParse along the way; new handling of tests for stopwords
Index: MailParse.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/MailParse.pm,v
retrieving revision 1.150
retrieving revision 1.151
diff -C2 -d -r1.150 -r1.151
*** MailParse.pm 26 Jul 2003 18:28:27 -0000 1.150
--- MailParse.pm 26 Jul 2003 21:17:18 -0000 1.151
***************
*** 387,391 ****
# Pull out any email addresses in the line that are marked with <> and have an @ in them
! while ( $line =~ s/(mailto:)?([[:alpha:]0-9\-_\.]+?@([[:alpha:]0-9\-_\.]+\.[[:alpha:]0-9\-_]+))([\&\)\?\:\/ >\&\;])// ) {
update_word($self, $2, $encoded, ($1?$1:''), '[\&\?\:\/ >\&\;]', $prefix);
add_url($self, $3, $encoded, '\@', '[\&\?\:\/]', $prefix);
--- 387,391 ----
# Pull out any email addresses in the line that are marked with <> and have an @ in them
! while ( $line =~ s/(mailto:)?([[:alpha:]0-9\-_\.]+?@([[:alpha:]0-9\-_\.]+\.[[:alpha:]0-9\-_]+))([\"\&\)\?\:\/ >\&\;])// ) {
update_word($self, $2, $encoded, ($1?$1:''), '[\&\?\:\/ >\&\;]', $prefix);
add_url($self, $3, $encoded, '\@', '[\&\?\:\/]', $prefix);
***************
*** 556,564 ****
}
}
-
- next;
}
- add_url( $self, $value, $encoded, $quote, $end_quote, '' );
next;
}
--- 556,561 ----
***************
*** 571,575 ****
if ($value =~ /^mailto:/i) {
! if ( $tag =~ /^a$/ && $value =~ /^mailto:([[:alpha:]0-9\-_\.]+?@([[:alpha:]0-9\-_\.]+?))([>\&\?\:\/]|$)/i ) {
update_word( $self, $1, $encoded, 'mailto:', ($3?'[\\\>\&\?\:\/]':$end_quote), '' );
add_url( $self, $2, $encoded, '@', ($3?'[\\\&\?\:\/]':$end_quote), '' );
--- 568,572 ----
if ($value =~ /^mailto:/i) {
! if ( $tag =~ /^a$/ && $value =~ /^mailto:([[:alpha:]0-9\-_\.]+?@([[:alpha:]0-9\-_\.]+?))([>\&\?\:\/\" \t]|$)/i ) {
update_word( $self, $1, $encoded, 'mailto:', ($3?'[\\\>\&\?\:\/]':$end_quote), '' );
add_url( $self, $2, $encoded, '@', ($3?'[\\\&\?\:\/]':$end_quote), '' );
***************
*** 602,606 ****
if ( $attribute =~ /^bgsound$/i && $tag =~ /^body$/i ) {
! add_url( $self, $2, $encoded, $quote, $end_quote, '' );
next;
}
--- 599,603 ----
if ( $attribute =~ /^bgsound$/i && $tag =~ /^body$/i ) {
! add_url( $self, $value, $encoded, $quote, $end_quote, '' );
next;
}
***************
*** 677,681 ****
# mailto forms
! if ( $value =~ /^mailto:([[:alpha:]0-9\-_\.]+?@([[:alpha:]0-9\-_\.]+?))([>\&\?\:\/])/i ) {
update_word( $self, $1, $encoded, 'mailto:', ($3?'[\\\>\&\?\:\/]':$end_quote), '' );
add_url( $self, $2, $encoded, '@', ($3?'[\\\>\&\?\:\/]':$end_quote), '' );
--- 674,678 ----
# mailto forms
! if ( $value =~ /^mailto:([[:alpha:]0-9\-_\.]+?@([[:alpha:]0-9\-_\.]+?))([>\&\?\:\/\" \t]|$)/i ) {
update_word( $self, $1, $encoded, 'mailto:', ($3?'[\\\>\&\?\:\/]':$end_quote), '' );
add_url( $self, $2, $encoded, '@', ($3?'[\\\>\&\?\:\/]':$end_quote), '' );
|
|
From: <jgr...@us...> - 2003-07-26 18:28:31
|
Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1:/tmp/cvs-serv15772/UI
Modified Files:
HTML.pm HTTP.pm XMLRPC.pm
Log Message:
Remove all tabs from the source code and fix my editor so that *I* don't introduce any more
Index: HTML.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v
retrieving revision 1.183
retrieving revision 1.184
diff -C2 -d -r1.183 -r1.184
*** HTML.pm 26 Jul 2003 07:39:19 -0000 1.183
--- HTML.pm 26 Jul 2003 18:28:28 -0000 1.184
***************
*** 419,423 ****
# assigning a new one through the password page
! if ( $k ne 'session' ) {
# If we are dealing with an array of values (see parse_form__
--- 419,423 ----
# assigning a new one through the password page
! if ( $k ne 'session' ) {
# If we are dealing with an array of values (see parse_form__
***************
*** 425,436 ****
# we ignore non-array values since all values have an array equivalent
! if ( $k =~ /^(.+)_array$/ ) {
my $field = $1;
foreach my $v (@{$self->{form_}{$k}}) {
$redirect_url .= "$field=$v&"
! }
! }
! }
}
--- 425,436 ----
# we ignore non-array values since all values have an array equivalent
! if ( $k =~ /^(.+)_array$/ ) {
my $field = $1;
foreach my $v (@{$self->{form_}{$k}}) {
$redirect_url .= "$field=$v&"
! }
! }
! }
}
***************
*** 468,472 ****
if ( -e ( $self->global_config_( 'msgdir' ) . $file ) ) {
$self->http_redirect_( $client, "/view?session=$self->{session_key__}&view=$self->{form_}{view}" );
! } else {
$self->http_redirect_( $client, "/history" );
}
--- 468,472 ----
if ( -e ( $self->global_config_( 'msgdir' ) . $file ) ) {
$self->http_redirect_( $client, "/view?session=$self->{session_key__}&view=$self->{form_}{view}" );
! } else {
$self->http_redirect_( $client, "/history" );
}
***************
*** 1102,1106 ****
$body .= "<a title=\"$full_line\">$line</a><br>";
! }
$body .= '</tt>';
--- 1102,1106 ----
$body .= "<a title=\"$full_line\">$line</a><br>";
! }
$body .= '</tt>';
***************
*** 1302,1306 ****
if ( $param =~ /parameter_(.*)/ ) {
$self->{configuration__}->parameter( $1, $self->{form_}{$param} );
! }
}
--- 1302,1306 ----
if ( $param =~ /parameter_(.*)/ ) {
$self->{configuration__}->parameter( $1, $self->{form_}{$param} );
! }
}
***************
*** 1438,1442 ****
if ( defined( $self->{form_}{delete} ) ) {
for my $i ( 1 .. $self->{form_}{count} ) {
! if ( defined( $self->{form_}{"remove$i"} ) && ( $self->{form_}{"remove$i"} ) ) {
my $mtype = $self->{form_}{"type$i"};
my $mtext = $self->{form_}{"text$i"};
--- 1438,1442 ----
if ( defined( $self->{form_}{delete} ) ) {
for my $i ( 1 .. $self->{form_}{count} ) {
! if ( defined( $self->{form_}{"remove$i"} ) && ( $self->{form_}{"remove$i"} ) ) {
my $mtype = $self->{form_}{"type$i"};
my $mtext = $self->{form_}{"text$i"};
***************
*** 1444,1448 ****
$self->{classifier__}->delete_magnet( $mbucket, $mtype, $mtext );
! }
}
}
--- 1444,1448 ----
$self->{classifier__}->delete_magnet( $mbucket, $mtype, $mtext );
! }
}
}
***************
*** 1460,1464 ****
$self->{classifier__}->delete_magnet( $obucket, $otype, $otext );
! }
if ( ( defined($mbucket) ) && ( $mbucket ne '' ) && ( $mtext ne '' ) ) {
--- 1460,1464 ----
$self->{classifier__}->delete_magnet( $obucket, $otype, $otext );
! }
if ( ( defined($mbucket) ) && ( $mbucket ne '' ) && ( $mtext ne '' ) ) {
***************
*** 1491,1495 ****
}
}
! }
if ( $found == 0 ) {
--- 1491,1495 ----
}
}
! }
if ( $found == 0 ) {
***************
*** 1507,1511 ****
$magnet_message .= "<blockquote>" . sprintf( $self->{language__}{Magnet_Error3}, "$mtype: $mtext", $mbucket ) . "</blockquote>";
}
! }
}
}
--- 1507,1511 ----
$magnet_message .= "<blockquote>" . sprintf( $self->{language__}{Magnet_Error3}, "$mtype: $mtext", $mbucket ) . "</blockquote>";
}
! }
}
}
***************
*** 1556,1562 ****
for my $magnet ($self->{classifier__}->get_magnets( $bucket, $type)) {
$count += 1;
! if ( ( $count < $start_magnet ) || ( $count > $stop_magnet ) ) {
next;
! }
$i += 1;
--- 1556,1562 ----
for my $magnet ($self->{classifier__}->get_magnets( $bucket, $type)) {
$count += 1;
! if ( ( $count < $start_magnet ) || ( $count > $stop_magnet ) ) {
next;
! }
$i += 1;
***************
*** 1585,1592 ****
$body .= ">\n<td><select name=\"type$i\" id=\"magnetsAddType\">\n";
! for my $mtype (keys %magnet_types) {
my $selected = ( $mtype eq $type )?"selected":"";
$body .= "<option value=\"$mtype\" $selected>\n$self->{language__}{$magnet_types{$mtype}}</option>\n";
! }
$body .= "</select>: <input type=\"text\" name=\"text$i\" value=\"$validatingMagnet\" size=\"" . max(length($magnet),50) . "\" /></td>\n";
$body .= "<td><select name=\"bucket$i\" id=\"magnetsAddBucket\">\n";
--- 1585,1592 ----
$body .= ">\n<td><select name=\"type$i\" id=\"magnetsAddType\">\n";
! for my $mtype (keys %magnet_types) {
my $selected = ( $mtype eq $type )?"selected":"";
$body .= "<option value=\"$mtype\" $selected>\n$self->{language__}{$magnet_types{$mtype}}</option>\n";
! }
$body .= "</select>: <input type=\"text\" name=\"text$i\" value=\"$validatingMagnet\" size=\"" . max(length($magnet),50) . "\" /></td>\n";
$body .= "<td><select name=\"bucket$i\" id=\"magnetsAddBucket\">\n";
***************
*** 1711,1745 ****
for my $i (@{$self->{classifier__}->get_bucket_word_list($self->{form_}{showbucket})}) {
if ( defined($i) ) {
! my $j = $i;
! $j =~ /^\|(.)/;
! my $first = $1;
! if ( defined( $self->{form_}{showletter} ) && ( $first eq $self->{form_}{showletter} ) ) {
! # Split the entries on the double bars
! my %temp;
! while ( $j =~ m/\G\|(.*?) L?\-?[\.\d]+\|/g ) {
! my $word = $1;
! $temp{$word} = $self->{classifier__}->get_count_for_word( $self->{form_}{showbucket}, $word );
! }
! $body .= "</td></tr><tr><td colspan=2> </td></tr><tr>\n<td valign=\"top\">\n<b>$first</b>\n</td>\n<td valign=\"top\">\n<table><tr valign=\"top\">";
! my $count = 0;
! for my $word (sort { $temp{$b} <=> $temp{$a} } keys %temp) {
! $body .= "</tr><tr valign=\"top\">" if ( ( $count % 6 ) == 0 );
! $body .= "<td><a class=\"wordListLink\" href=\"\/buckets\?session=$self->{session_key__}\&lookup=Lookup\&word=". $self->url_encode_( $word ) . "#Lookup\"><b>$word</b><\/a></td><td>$temp{$word}</td><td> </td>";
! $count += 1;
! }
! $body .= "</tr></table></td>\n</tr>\n<tr><td colspan=2> </td></tr><tr><td colspan=2>";
! } else {
! $j = '';
! $body .= "<a href=/buckets?session=$self->{session_key__}\&showbucket=$self->{form_}{showbucket}\&showletter=" . $self->url_encode_($first) . "><b>$first</b></a>\n";
! }
}
}
--- 1711,1745 ----
for my $i (@{$self->{classifier__}->get_bucket_word_list($self->{form_}{showbucket})}) {
if ( defined($i) ) {
! my $j = $i;
! $j =~ /^\|(.)/;
! my $first = $1;
! if ( defined( $self->{form_}{showletter} ) && ( $first eq $self->{form_}{showletter} ) ) {
! # Split the entries on the double bars
! my %temp;
! while ( $j =~ m/\G\|(.*?) L?\-?[\.\d]+\|/g ) {
! my $word = $1;
! $temp{$word} = $self->{classifier__}->get_count_for_word( $self->{form_}{showbucket}, $word );
! }
! $body .= "</td></tr><tr><td colspan=2> </td></tr><tr>\n<td valign=\"top\">\n<b>$first</b>\n</td>\n<td valign=\"top\">\n<table><tr valign=\"top\">";
! my $count = 0;
! for my $word (sort { $temp{$b} <=> $temp{$a} } keys %temp) {
! $body .= "</tr><tr valign=\"top\">" if ( ( $count % 6 ) == 0 );
! $body .= "<td><a class=\"wordListLink\" href=\"\/buckets\?session=$self->{session_key__}\&lookup=Lookup\&word=". $self->url_encode_( $word ) . "#Lookup\"><b>$word</b><\/a></td><td>$temp{$word}</td><td> </td>";
! $count += 1;
! }
! $body .= "</tr></table></td>\n</tr>\n<tr><td colspan=2> </td></tr><tr><td colspan=2>";
! } else {
! $j = '';
! $body .= "<a href=/buckets?session=$self->{session_key__}\&showbucket=$self->{form_}{showbucket}\&showletter=" . $self->url_encode_($first) . "><b>$first</b></a>\n";
! }
}
}
***************
*** 1790,1797 ****
$percent = sprintf( ' (%.2f%%)', int( $value * 10000 / $total_count ) / 100 );
}
! }
$body .= "\n<td align=\"right\">$count$percent</td>";
! }
$body .= "\n</tr>\n";
}
--- 1790,1797 ----
$percent = sprintf( ' (%.2f%%)', int( $value * 10000 / $total_count ) / 100 );
}
! }
$body .= "\n<td align=\"right\">$count$percent</td>";
! }
$body .= "\n</tr>\n";
}
***************
*** 2222,2226 ****
}
}
! }
foreach my $bucket (@buckets) {
--- 2222,2226 ----
}
}
! }
foreach my $bucket (@buckets) {
***************
*** 2543,2547 ****
if ( $2 > $max ) {
$max = $2;
! }
# If this file already exists in the history cache then just mark it not
--- 2543,2547 ----
if ( $2 > $max ) {
$max = $2;
! }
# If this file already exists in the history cache then just mark it not
***************
*** 2931,2935 ****
$self->{classifier__}->set_bucket_parameter( $bucket, 'count', $count );
! $count = $self->{classifier__}->get_bucket_parameter( $usedtobe, 'count' ) + 1;
$self->{classifier__}->set_bucket_parameter( $usedtobe, 'count', $count );
--- 2931,2935 ----
$self->{classifier__}->set_bucket_parameter( $bucket, 'count', $count );
! $count = $self->{classifier__}->get_bucket_parameter( $usedtobe, 'count' ) + 1;
$self->{classifier__}->set_bucket_parameter( $usedtobe, 'count', $count );
***************
*** 2941,2945 ****
$fpcount = 0 if ( $fpcount < 0 );
$self->{classifier__}->set_bucket_parameter( $usedtobe, 'fpcount', $fpcount );
! }
# Since we have just changed the classification of this file and it has
--- 2941,2945 ----
$fpcount = 0 if ( $fpcount < 0 );
$self->{classifier__}->set_bucket_parameter( $usedtobe, 'fpcount', $fpcount );
! }
# Since we have just changed the classification of this file and it has
***************
*** 3431,3445 ****
} else {
if ( $self->{history__}{$mail_file}{magnet} eq '' ) {
! $body .= "\n$self->{language__}{History_ShouldBe}: <select name=\"$index\">\n";
! # Show a blank bucket field
! $body .= "<option selected=\"selected\"></option>\n";
! foreach my $abucket ($self->{classifier__}->get_buckets()) {
! $body .= "<option value=\"$abucket\">$abucket</option>\n";
! }
! $body .= "</select>\n<input type=\"submit\" class=\"reclassifyButton\" name=\"change\" value=\"$self->{language__}{Reclassify}\" />";
} else {
! $body .= " ($self->{language__}{History_MagnetUsed}: " . splitline( $self->{history__}{$mail_file}{magnet} , 0) . ")";
}
}
--- 3431,3445 ----
} else {
if ( $self->{history__}{$mail_file}{magnet} eq '' ) {
! $body .= "\n$self->{language__}{History_ShouldBe}: <select name=\"$index\">\n";
! # Show a blank bucket field
! $body .= "<option selected=\"selected\"></option>\n";
! foreach my $abucket ($self->{classifier__}->get_buckets()) {
! $body .= "<option value=\"$abucket\">$abucket</option>\n";
! }
! $body .= "</select>\n<input type=\"submit\" class=\"reclassifyButton\" name=\"change\" value=\"$self->{language__}{Reclassify}\" />";
} else {
! $body .= " ($self->{language__}{History_MagnetUsed}: " . splitline( $self->{history__}{$mail_file}{magnet} , 0) . ")";
}
}
***************
*** 3639,3643 ****
if ( rand(1) < rand(1) ) {
$random = lc($random);
! }
$self->{session_key__} .= $random;
--- 3639,3643 ----
if ( rand(1) < rand(1) ) {
$random = lc($random);
! }
$self->{session_key__} .= $random;
Index: HTTP.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTTP.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** HTTP.pm 23 Jun 2003 22:34:37 -0000 1.8
--- HTTP.pm 26 Jul 2003 18:28:28 -0000 1.9
***************
*** 237,241 ****
if ( $need_array ) {
push( @{ $self->{form_}{$arg . "_array"} }, $self->{form_}{$arg} );
! }
}
}
--- 237,241 ----
if ( $need_array ) {
push( @{ $self->{form_}{$arg . "_array"} }, $self->{form_}{$arg} );
! }
}
}
***************
*** 334,339 ****
my $expires = sprintf( "%s, %02d %s %04d %02d:%02d:%02d GMT",
! $day[$wday], $mday, $month[$mon], $year+1900,
! $hour, $min, $sec);
my $header = "HTTP/1.0 200 OK\r\nContent-Type: $type\r\nExpires: $expires\r\nContent-Length: ";
--- 334,339 ----
my $expires = sprintf( "%s, %02d %s %04d %02d:%02d:%02d GMT",
! $day[$wday], $mday, $month[$mon], $year+1900,
! $hour, $min, $sec);
my $header = "HTTP/1.0 200 OK\r\nContent-Type: $type\r\nExpires: $expires\r\nContent-Length: ";
Index: XMLRPC.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/XMLRPC.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** XMLRPC.pm 14 Jun 2003 21:10:13 -0000 1.3
--- XMLRPC.pm 26 Jul 2003 18:28:28 -0000 1.4
***************
*** 177,181 ****
$client->send_response( $self->{server__}->response );
$client->close();
! }
}
}
--- 177,181 ----
$client->send_response( $self->{server__}->response );
$client->close();
! }
}
}
|
|
From: <jgr...@us...> - 2003-07-26 18:28:31
|
Update of /cvsroot/popfile/engine/Proxy
In directory sc8-pr-cvs1:/tmp/cvs-serv15772/Proxy
Modified Files:
POP3.pm Proxy.pm
Log Message:
Remove all tabs from the source code and fix my editor so that *I* don't introduce any more
Index: POP3.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Proxy/POP3.pm,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** POP3.pm 9 Jul 2003 21:15:39 -0000 1.62
--- POP3.pm 26 Jul 2003 18:28:28 -0000 1.63
***************
*** 144,148 ****
# will pull email from. Doing this means we can act as a proxy for multiple mail clients
# and mail accounts
! my $user_command = 'USER (.+)(:(\d+))?' . $self->config_( 'separator' ) . '(.+)';
if ( $command =~ /$user_command/i ) {
if ( $1 ne '' ) {
--- 144,148 ----
# will pull email from. Doing this means we can act as a proxy for multiple mail clients
# and mail accounts
! my $user_command = 'USER (.+)(:(\d+))?' . $self->config_( 'separator' ) . '(.+)';
if ( $command =~ /$user_command/i ) {
if ( $1 ne '' ) {
Index: Proxy.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Proxy/Proxy.pm,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** Proxy.pm 26 Jul 2003 17:14:42 -0000 1.27
--- Proxy.pm 26 Jul 2003 18:28:28 -0000 1.28
***************
*** 204,216 ****
$self->mq_post_( 'CLASS', $1, '' );
! }
if ( $message =~ /NEWFL:(.*)/ ) {
$self->mq_post_( 'NEWFL', $1, '' );
! }
if ( $message =~ /LOGIN:(.*)/ ) {
$self->mq_post_( 'LOGIN', $1, '' );
! }
} else {
# This is here so that we get in errorneous position where the pipeready
--- 204,216 ----
$self->mq_post_( 'CLASS', $1, '' );
! }
if ( $message =~ /NEWFL:(.*)/ ) {
$self->mq_post_( 'NEWFL', $1, '' );
! }
if ( $message =~ /LOGIN:(.*)/ ) {
$self->mq_post_( 'LOGIN', $1, '' );
! }
} else {
# This is here so that we get in errorneous position where the pipeready
***************
*** 419,423 ****
if ( $n > 0 ) {
$self->tee_( $client, $buf ) if ( $discard != 1 );
! }
}
--- 419,423 ----
if ( $n > 0 ) {
$self->tee_( $client, $buf ) if ( $discard != 1 );
! }
}
|
|
From: <jgr...@us...> - 2003-07-26 18:28:31
|
Update of /cvsroot/popfile/engine/Test
In directory sc8-pr-cvs1:/tmp/cvs-serv15772/Test
Modified Files:
SimpleProxy.pm
Log Message:
Remove all tabs from the source code and fix my editor so that *I* don't introduce any more
Index: SimpleProxy.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Test/SimpleProxy.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** SimpleProxy.pm 26 Jul 2003 17:14:43 -0000 1.7
--- SimpleProxy.pm 26 Jul 2003 18:28:28 -0000 1.8
***************
*** 110,114 ****
$self->tee_( $handle, "$1$eol" );
select( undef, undef, undef, 0.1 );
! }
# If there's data available to read then read it into the received
--- 110,114 ----
$self->tee_( $handle, "$1$eol" );
select( undef, undef, undef, 0.1 );
! }
# If there's data available to read then read it into the received
***************
*** 118,123 ****
if ( defined( $line ) ) {
$self->{received__} .= $line;
! }
! }
} else {
$self->log_( "service_server: remote client is not connected" );
--- 118,123 ----
if ( defined( $line ) ) {
$self->{received__} .= $line;
! }
! }
} else {
$self->log_( "service_server: remote client is not connected" );
***************
*** 131,136 ****
$self->tee_( $handle, "To The Jungle$eol" );
! }
! }
}
}
--- 131,136 ----
$self->tee_( $handle, "To The Jungle$eol" );
! }
! }
}
}
***************
*** 173,179 ****
my $line = <$remote>;
if ( defined( $line ) ) {
! last if ( $line =~ /__POPFILE__ABORT__CHILD__/ );
print $client $line;
! } else {
last;
}
--- 173,179 ----
my $line = <$remote>;
if ( defined( $line ) ) {
! last if ( $line =~ /__POPFILE__ABORT__CHILD__/ );
print $client $line;
! } else {
last;
}
|
|
From: <jgr...@us...> - 2003-07-26 18:28:30
|
Update of /cvsroot/popfile/engine/Devel
In directory sc8-pr-cvs1:/tmp/cvs-serv15772/Devel
Modified Files:
TestCoverage.pm
Log Message:
Remove all tabs from the source code and fix my editor so that *I* don't introduce any more
Index: TestCoverage.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Devel/TestCoverage.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** TestCoverage.pm 26 Jul 2003 14:59:46 -0000 1.9
--- TestCoverage.pm 26 Jul 2003 18:28:27 -0000 1.10
***************
*** 19,26 ****
BEGIN
{
! # We want to look inside subroutines so tell the debugger to trace into
! # them
! $DB::trace = 1;
}
--- 19,26 ----
BEGIN
{
! # We want to look inside subroutines so tell the debugger to trace into
! # them
! $DB::trace = 1;
}
***************
*** 29,51 ****
sub DB
{
! # The caller function we till us what line of code, in which file and
! # package called us
! my ($package, $file, $line) = caller;
! # A specific line in a specific file just got executed, we remove
! # certain references to eval code that we wont have traced into
! $count{$file}{$line} += 1 if ( ( $file =~ /\(eval/ ) == 0 );
}
END
{
! # Print out information for each file
! for my $file (keys %count)
! {
! if ( ( $file =~ /^[^\/]/ ) && ( $file ne '../tests.pl' ) && !( $file =~ /^..\/\/Test\// ) ) {
! my $current_line = 0;
my $block_executed = 0;
!
! open SOURCE_FILE, "<$file";
my $clean = $file;
$clean =~ s/^\.\.\/\///;
--- 29,51 ----
sub DB
{
! # The caller function we till us what line of code, in which file and
! # package called us
! my ($package, $file, $line) = caller;
! # A specific line in a specific file just got executed, we remove
! # certain references to eval code that we wont have traced into
! $count{$file}{$line} += 1 if ( ( $file =~ /\(eval/ ) == 0 );
}
END
{
! # Print out information for each file
! for my $file (keys %count)
! {
! if ( ( $file =~ /^[^\/]/ ) && ( $file ne '../tests.pl' ) && !( $file =~ /^..\/\/Test\// ) ) {
! my $current_line = 0;
my $block_executed = 0;
!
! open SOURCE_FILE, "<$file";
my $clean = $file;
$clean =~ s/^\.\.\/\///;
***************
*** 53,78 ****
open LINE_DATA, ">$clean.$$.lne";
! # Read in each line of the source file and keep track of whether
! # it was executed or not using a new couple of keys in the
! # %count hash for each file: total_lines, total_executable_lines
! # and total_executed
! while (<SOURCE_FILE>)
! {
! # Keep count of the total number of lines in this file
! $current_line += 1;
!
! # We do not count lines that are blank or exclusively
! # comments or just have braces on them or
! # just an else or just a subroutine definition
! if ( ( ( /^\s*\#/ == 0 ) &&
( /^\s*$/ == 0 ) &&
( /^\s*(\{|\}|else|\s)+\s*$/ == 0 ) &&
( /^\s*sub \w+( \{)?\s*$/ == 0 ) &&
( /^\s*package / == 0 ) ) || ( $block_executed ) ) {
! $count{$file}{total_executable_lines} += 1;
!
! # If this line was executed then keep count of
! # that fact
!
if ( ( $count{$file}{$current_line} > 0 ) || ( $block_executed ) ) {
print LINE_DATA "1\n";
--- 53,78 ----
open LINE_DATA, ">$clean.$$.lne";
! # Read in each line of the source file and keep track of whether
! # it was executed or not using a new couple of keys in the
! # %count hash for each file: total_lines, total_executable_lines
! # and total_executed
! while (<SOURCE_FILE>)
! {
! # Keep count of the total number of lines in this file
! $current_line += 1;
!
! # We do not count lines that are blank or exclusively
! # comments or just have braces on them or
! # just an else or just a subroutine definition
! if ( ( ( /^\s*\#/ == 0 ) &&
( /^\s*$/ == 0 ) &&
( /^\s*(\{|\}|else|\s)+\s*$/ == 0 ) &&
( /^\s*sub \w+( \{)?\s*$/ == 0 ) &&
( /^\s*package / == 0 ) ) || ( $block_executed ) ) {
! $count{$file}{total_executable_lines} += 1;
!
! # If this line was executed then keep count of
! # that fact
!
if ( ( $count{$file}{$current_line} > 0 ) || ( $block_executed ) ) {
print LINE_DATA "1\n";
***************
*** 82,101 ****
# in the block if the first line was
! if ( /\# PROFILE BLOCK START/ ) {
$block_executed = 1;
! }
! if ( /\# PROFILE BLOCK STOP/ ) {
$block_executed = 0;
! }
! } else {
print LINE_DATA "0\n";
}
! } else {
print LINE_DATA "\n";
}
! }
!
! close SOURCE_FILE;
close LINE_DATA;
--- 82,101 ----
# in the block if the first line was
! if ( /\# PROFILE BLOCK START/ ) {
$block_executed = 1;
! }
! if ( /\# PROFILE BLOCK STOP/ ) {
$block_executed = 0;
! }
! } else {
print LINE_DATA "0\n";
}
! } else {
print LINE_DATA "\n";
}
! }
!
! close SOURCE_FILE;
close LINE_DATA;
***************
*** 104,108 ****
if ( $block_executed ) {
print "WARNING: unterminated PROFILE BLOCK detected; did you forget a PROFILE BLOCK STOP in $file?\n";
! }
}
}
--- 104,108 ----
if ( $block_executed ) {
print "WARNING: unterminated PROFILE BLOCK detected; did you forget a PROFILE BLOCK STOP in $file?\n";
! }
}
}
|
|
From: <jgr...@us...> - 2003-07-26 18:28:30
|
Update of /cvsroot/popfile/engine/POPFile
In directory sc8-pr-cvs1:/tmp/cvs-serv15772/POPFile
Modified Files:
Configuration.pm Loader.pm Logger.pm MQ.pm
Log Message:
Remove all tabs from the source code and fix my editor so that *I* don't introduce any more
Index: Configuration.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/Configuration.pm,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** Configuration.pm 26 Jul 2003 14:59:46 -0000 1.24
--- Configuration.pm 26 Jul 2003 18:28:28 -0000 1.25
***************
*** 304,308 ****
if ( $ARGV[$i] =~ /^-(.+)$/ ) {
! my $parameter = $self->upgrade_parameter__($1);
if ( defined($self->{configuration_parameters__}{$parameter}) ) {
--- 304,308 ----
if ( $ARGV[$i] =~ /^-(.+)$/ ) {
! my $parameter = $self->upgrade_parameter__($1);
if ( defined($self->{configuration_parameters__}{$parameter}) ) {
***************
*** 347,398 ****
my %upgrades = ( # PROFILE BLOCK START
! # Parameters that are now handled by Classifier::Bayes
! 'corpus', 'bayes_corpus',
! 'unclassified_probability', 'bayes_unclassified_probability',
! # Parameters that are now handled by POPFile::Configuration
! 'piddir', 'config_piddir',
! # Parameters that are now global to POPFile
! 'debug', 'GLOBAL_debug',
! 'msgdir', 'GLOBAL_msgdir',
! 'subject', 'GLOBAL_subject',
! 'timeout', 'GLOBAL_timeout',
! 'xpl', 'GLOBAL_xpl',
! 'xtc', 'GLOBAL_xtc',
! 'download_count', 'GLOBAL_download_count',
! # Parameters that are now handled by POPFile::Logger
! 'logdir', 'logger_logdir',
! # Parameters that are now handled by Proxy::POP3
! 'localpop', 'pop3_local',
! 'port', 'pop3_port',
! 'sport', 'pop3_secure_port',
! 'server', 'pop3_secure_server',
! 'separator', 'pop3_separator',
! 'toptoo', 'pop3_toptoo',
! # Parameters that are now handled by UI::HTML
! 'archive', 'html_archive',
! 'archive_classes', 'html_archive_classes',
! 'archive_dir', 'html_archive_dir',
! 'history_days', 'html_history_days',
! 'language', 'html_language',
! 'last_reset', 'html_last_reset',
! 'last_update_check', 'html_last_update_check',
! 'localui', 'html_local',
! 'page_size', 'html_page_size',
! 'password', 'html_password',
! 'send_stats', 'html_send_stats',
! 'skin', 'html_skin',
! 'test_language', 'html_test_language',
! 'update_check', 'html_update_check',
'ui_port', 'html_port',
); # PROFILE BLOCK STOP
--- 347,398 ----
my %upgrades = ( # PROFILE BLOCK START
! # Parameters that are now handled by Classifier::Bayes
! 'corpus', 'bayes_corpus',
! 'unclassified_probability', 'bayes_unclassified_probability',
! # Parameters that are now handled by POPFile::Configuration
! 'piddir', 'config_piddir',
! # Parameters that are now global to POPFile
! 'debug', 'GLOBAL_debug',
! 'msgdir', 'GLOBAL_msgdir',
! 'subject', 'GLOBAL_subject',
! 'timeout', 'GLOBAL_timeout',
! 'xpl', 'GLOBAL_xpl',
! 'xtc', 'GLOBAL_xtc',
! 'download_count', 'GLOBAL_download_count',
! # Parameters that are now handled by POPFile::Logger
! 'logdir', 'logger_logdir',
! # Parameters that are now handled by Proxy::POP3
! 'localpop', 'pop3_local',
! 'port', 'pop3_port',
! 'sport', 'pop3_secure_port',
! 'server', 'pop3_secure_server',
! 'separator', 'pop3_separator',
! 'toptoo', 'pop3_toptoo',
! # Parameters that are now handled by UI::HTML
! 'archive', 'html_archive',
! 'archive_classes', 'html_archive_classes',
! 'archive_dir', 'html_archive_dir',
! 'history_days', 'html_history_days',
! 'language', 'html_language',
! 'last_reset', 'html_last_reset',
! 'last_update_check', 'html_last_update_check',
! 'localui', 'html_local',
! 'page_size', 'html_page_size',
! 'password', 'html_password',
! 'send_stats', 'html_send_stats',
! 'skin', 'html_skin',
! 'test_language', 'html_test_language',
! 'update_check', 'html_update_check',
'ui_port', 'html_port',
); # PROFILE BLOCK STOP
***************
*** 421,428 ****
s/(\015|\012)//g;
if ( /(\S+) (.+)/ ) {
! my $parameter = $1;
! my $value = $2;
! $parameter = $self->upgrade_parameter__($parameter);
$self->{configuration_parameters__}{$parameter} = $value;
--- 421,428 ----
s/(\015|\012)//g;
if ( /(\S+) (.+)/ ) {
! my $parameter = $1;
! my $value = $2;
! $parameter = $self->upgrade_parameter__($parameter);
$self->{configuration_parameters__}{$parameter} = $value;
Index: Loader.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/Loader.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Loader.pm 17 Jul 2003 20:12:16 -0000 1.3
--- Loader.pm 26 Jul 2003 18:28:28 -0000 1.4
***************
*** 610,614 ****
foreach my $name (keys %{$self->{components__}{$type}}) {
print " $name" if $self->{debug__};
! flush STDOUT;
$self->{components__}{$type}{$name}->alive(0);
$self->{components__}{$type}{$name}->stop();
--- 610,614 ----
foreach my $name (keys %{$self->{components__}{$type}}) {
print " $name" if $self->{debug__};
! flush STDOUT;
$self->{components__}{$type}{$name}->alive(0);
$self->{components__}{$type}{$name}->stop();
Index: Logger.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/Logger.pm,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** Logger.pm 9 Jul 2003 18:18:19 -0000 1.20
--- Logger.pm 26 Jul 2003 18:28:28 -0000 1.21
***************
*** 175,181 ****
push @{$self->{last_ten__}}, ($msg);
! if ( $#{$self->{last_ten__}} > 9 ) {
shift @{$self->{last_ten__}};
! }
}
}
--- 175,181 ----
push @{$self->{last_ten__}}, ($msg);
! if ( $#{$self->{last_ten__}} > 9 ) {
shift @{$self->{last_ten__}};
! }
}
}
Index: MQ.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/MQ.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** MQ.pm 12 Jul 2003 00:43:20 -0000 1.3
--- MQ.pm 26 Jul 2003 18:28:28 -0000 1.4
***************
*** 94,99 ****
$waiter->deliver( $type, $message, $parameter );
! }
! }
}
--- 94,99 ----
$waiter->deliver( $type, $message, $parameter );
! }
! }
}
|
|
From: <jgr...@us...> - 2003-07-26 18:28:30
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv15772/Classifier
Modified Files:
MailParse.pm
Log Message:
Remove all tabs from the source code and fix my editor so that *I* don't introduce any more
Index: MailParse.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/MailParse.pm,v
retrieving revision 1.149
retrieving revision 1.150
diff -C2 -d -r1.149 -r1.150
*** MailParse.pm 26 Jul 2003 18:09:05 -0000 1.149
--- MailParse.pm 26 Jul 2003 18:28:27 -0000 1.150
***************
*** 297,301 ****
$after = '&' if ( $after eq '>' );
if ( !( $self->{ut__} =~ s/($before)\Q$word\E($after)/$1<b><font color=\"$color\">$word<\/font><\/b>$2/ ) ) {
! print "Could not find $word for colorization\n" if ( $self->{debug__} );
}
} else {
--- 297,301 ----
$after = '&' if ( $after eq '>' );
if ( !( $self->{ut__} =~ s/($before)\Q$word\E($after)/$1<b><font color=\"$color\">$word<\/font><\/b>$2/ ) ) {
! print "Could not find $word for colorization\n" if ( $self->{debug__} );
}
} else {
***************
*** 345,349 ****
if ( $self->{htmlcolordistance__} < 100 ) {
$self->update_pseudoword( 'html', "colordistance$self->{htmlcolordistance__}", $encoded, '' );
! }
while ( $p < length($bigline) ) {
--- 345,349 ----
if ( $self->{htmlcolordistance__} < 100 ) {
$self->update_pseudoword( 'html', "colordistance$self->{htmlcolordistance__}", $encoded, '' );
! }
while ( $p < length($bigline) ) {
***************
*** 441,445 ****
if ( $bigline =~ /[^ \t]/ ) {
$self->update_pseudoword( 'trick', 'invisibleink', $encoded, $bigline );
! }
}
}
--- 441,445 ----
if ( $bigline =~ /[^ \t]/ ) {
$self->update_pseudoword( 'trick', 'invisibleink', $encoded, $bigline );
! }
}
}
***************
*** 476,486 ****
}
! # If we hit a table tag then any font information is lost
! if ( $tag =~ /^(table|td|tr|th)$/i ) {
! $self->{htmlfontcolor__} = map_color( $self, 'black' );
! $self->{htmlbackcolor__} = $self->{htmlbodycolor__};
$self->compute_html_color_distance();
! }
return;
--- 476,486 ----
}
! # If we hit a table tag then any font information is lost
! if ( $tag =~ /^(table|td|tr|th)$/i ) {
! $self->{htmlfontcolor__} = map_color( $self, 'black' );
! $self->{htmlbackcolor__} = $self->{htmlbodycolor__};
$self->compute_html_color_distance();
! }
return;
***************
*** 552,558 ****
if ( ( $host ne '' ) && ( $tag =~ /^img$/i ) ) {
! if ( $host ne 'localhost' ) {
$self->update_pseudoword( 'html', 'imgremotesrc', $encoded, $original );
! }
}
--- 552,558 ----
if ( ( $host ne '' ) && ( $tag =~ /^img$/i ) ) {
! if ( $host ne 'localhost' ) {
$self->update_pseudoword( 'html', 'imgremotesrc', $encoded, $original );
! }
}
***************
*** 614,618 ****
$self->{htmlfontcolor__} = map_color($self, $value);
$self->compute_html_color_distance();
! print "Set html font color to $self->{htmlfontcolor__}\n" if ( $self->{debug__} );
}
--- 614,618 ----
$self->{htmlfontcolor__} = map_color($self, $value);
$self->compute_html_color_distance();
! print "Set html font color to $self->{htmlfontcolor__}\n" if ( $self->{debug__} );
}
***************
*** 622,626 ****
$self->{htmlfontcolor__} = map_color($self, $value);
$self->compute_html_color_distance();
! print "Set html font color to $self->{htmlfontcolor__}\n" if ( $self->{debug__} );
}
--- 622,626 ----
$self->{htmlfontcolor__} = map_color($self, $value);
$self->compute_html_color_distance();
! print "Set html font color to $self->{htmlfontcolor__}\n" if ( $self->{debug__} );
}
***************
*** 644,648 ****
$self->update_pseudoword( 'html', "backcolor$value" );
$self->{htmlbackcolor__} = map_color($self, $value);
! print "Set html back color to $self->{htmlbackcolor__}\n" if ( $self->{debug__} );
$self->{htmlbodycolor__} = $self->{htmlbackcolor__} if ( $tag =~ /^body$/i );
--- 644,648 ----
$self->update_pseudoword( 'html', "backcolor$value" );
$self->{htmlbackcolor__} = map_color($self, $value);
! print "Set html back color to $self->{htmlbackcolor__}\n" if ( $self->{debug__} );
$self->{htmlbodycolor__} = $self->{htmlbackcolor__} if ( $tag =~ /^body$/i );
***************
*** 1337,1341 ****
$decode_it = decode_qp( $decode_it );
$mystring =~ s/=\?[\w-]+\?Q\?(.*?)\?=/$decode_it/i;
! }
}
}
--- 1337,1341 ----
$decode_it = decode_qp( $decode_it );
$mystring =~ s/=\?[\w-]+\?Q\?(.*?)\?=/$decode_it/i;
! }
}
}
|
|
From: <jgr...@us...> - 2003-07-26 18:28:30
|
Update of /cvsroot/popfile/engine
In directory sc8-pr-cvs1:/tmp/cvs-serv15772
Modified Files:
coverage.pl tests.pl
Log Message:
Remove all tabs from the source code and fix my editor so that *I* don't introduce any more
Index: coverage.pl
===================================================================
RCS file: /cvsroot/popfile/engine/coverage.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** coverage.pl 26 Jul 2003 17:41:26 -0000 1.8
--- coverage.pl 26 Jul 2003 18:28:27 -0000 1.9
***************
*** 43,54 ****
$current_line += 1;
! my $state = <LINE_DATA>;
if ( $state =~ /1/ ) {
$count{$module}{executed}{$current_line} = 1;
} elsif ( $state =~ /0/ ) {
! if ( $count{$module}{executed}{$current_line} != 1 ) {
$count{$module}{executed}{$current_line} = 0;
! }
}
}
--- 43,54 ----
$current_line += 1;
! my $state = <LINE_DATA>;
if ( $state =~ /1/ ) {
$count{$module}{executed}{$current_line} = 1;
} elsif ( $state =~ /0/ ) {
! if ( $count{$module}{executed}{$current_line} != 1 ) {
$count{$module}{executed}{$current_line} = 0;
! }
}
}
***************
*** 68,72 ****
if ($count{$module}{executed}{$line} == 1) {
$total_executed += 1;
! } else {
$total_not_executed += 1;
}
--- 68,72 ----
if ($count{$module}{executed}{$line} == 1) {
$total_executed += 1;
! } else {
$total_not_executed += 1;
}
***************
*** 111,115 ****
print HTML " ";
$length -= 1;
! }
print HTML "$line </font>";
print HTML "<span style=\"background: $block\"> </span><font color=$color>$_</font>";
--- 111,115 ----
print HTML " ";
$length -= 1;
! }
print HTML "$line </font>";
print HTML "<span style=\"background: $block\"> </span><font color=$color>$_</font>";
Index: tests.pl
===================================================================
RCS file: /cvsroot/popfile/engine/tests.pl,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** tests.pl 21 Jul 2003 19:03:51 -0000 1.22
--- tests.pl 26 Jul 2003 18:28:27 -0000 1.23
***************
*** 23,33 ****
# ---------------------------------------------------------------------------------------------
#
! # test_report - Report whether a test passed or not
#
# $ok Boolean indicating whether the test passed
! # $test String containing the test executed
! # $file The name of the file invoking the test
! # $line The line in the $file where the test can be found
! # $context (Optional) String containing extra context information
#
# ---------------------------------------------------------------------------------------------
--- 23,33 ----
# ---------------------------------------------------------------------------------------------
#
! # test_report - Report whether a test passed or not
#
# $ok Boolean indicating whether the test passed
! # $test String containing the test executed
! # $file The name of the file invoking the test
! # $line The line in the $file where the test can be found
! # $context (Optional) String containing extra context information
#
# ---------------------------------------------------------------------------------------------
***************
*** 35,63 ****
sub test_report
{
! my ( $ok, $test, $file, $line, $context ) = @_;
!
! $test_count += 1;
!
! if ( !$ok ) {
! $fail_messages .= "\n $file:$line failed '$test'";
! if ( defined( $context ) ) {
! $fail_messages .= " ($context)";
! }
! $test_failures += 1;
! } else {
# print "Test pass at $file:$line\n";
}
!
! flush STDOUT;
}
# ---------------------------------------------------------------------------------------------
#
! # test_assert - Perform a test and assert that its result must be true
#
! # $file The name of the file invoking the test
! # $line The line in the $file where the test can be found
! # $test String containing the test to be executed
! # $context (Optional) String containing extra context information
#
# Example: test_assert( 'function(parameter) == 1' ) YOU DO NOT NEED TO GIVE THE
--- 35,63 ----
sub test_report
{
! my ( $ok, $test, $file, $line, $context ) = @_;
!
! $test_count += 1;
!
! if ( !$ok ) {
! $fail_messages .= "\n $file:$line failed '$test'";
! if ( defined( $context ) ) {
! $fail_messages .= " ($context)";
! }
! $test_failures += 1;
! } else {
# print "Test pass at $file:$line\n";
}
!
! flush STDOUT;
}
# ---------------------------------------------------------------------------------------------
#
! # test_assert - Perform a test and assert that its result must be true
#
! # $file The name of the file invoking the test
! # $line The line in the $file where the test can be found
! # $test String containing the test to be executed
! # $context (Optional) String containing extra context information
#
# Example: test_assert( 'function(parameter) == 1' ) YOU DO NOT NEED TO GIVE THE
***************
*** 68,85 ****
sub test_assert
{
! my ( $file, $line, $test, $context ) = @_;
!
! test_report( eval( $test ), $test, $file, $line, $context );
}
# ---------------------------------------------------------------------------------------------
#
! # test_assert_equal - Perform a test and assert that its result is equal an expected result
#
! # $file The name of the file invoking the test
! # $line The line in the $file where the test can be found
! # $test The result of the test that was just run
! # $expected The expected result
! # $context (Optional) String containing extra context information
#
# Example: test_assert_equal( function(parameter), 'result' )
--- 68,85 ----
sub test_assert
{
! my ( $file, $line, $test, $context ) = @_;
!
! test_report( eval( $test ), $test, $file, $line, $context );
}
# ---------------------------------------------------------------------------------------------
#
! # test_assert_equal - Perform a test and assert that its result is equal an expected result
#
! # $file The name of the file invoking the test
! # $line The line in the $file where the test can be found
! # $test The result of the test that was just run
! # $expected The expected result
! # $context (Optional) String containing extra context information
#
# Example: test_assert_equal( function(parameter), 'result' )
***************
*** 92,120 ****
sub test_assert_equal
{
! my ( $file, $line, $test, $expected, $context ) = @_;
! my $result;
! if ( !( $expected =~ /[^0-9]/ ) ) {
!
! # This int() and is so that we don't get bitten by odd
! # floating point problems
! my $scale = 1e10;
! $result = ( int( $test * $scale ) == int( $expected * $scale ) );
! } else {
! $result = ( $test eq $expected );
! }
! test_report( $result, "expecting $expected and got $test", $file, $line, $context );
}
# ---------------------------------------------------------------------------------------------
#
! # test_assert_regexp - Perform a test and assert that its result matches a regexp
#
! # $file The name of the file invoking the test
! # $line The line in the $file where the test can be found
! # $test The result of the test that was just run
! # $expected The expected result in the form of a regexp
! # $context (Optional) String containing extra context information
#
# Example: test_assert_regexp( function(parameter), '^result' )
--- 92,120 ----
sub test_assert_equal
{
! my ( $file, $line, $test, $expected, $context ) = @_;
! my $result;
! if ( !( $expected =~ /[^0-9]/ ) ) {
!
! # This int() and is so that we don't get bitten by odd
! # floating point problems
! my $scale = 1e10;
! $result = ( int( $test * $scale ) == int( $expected * $scale ) );
! } else {
! $result = ( $test eq $expected );
! }
! test_report( $result, "expecting $expected and got $test", $file, $line, $context );
}
# ---------------------------------------------------------------------------------------------
#
! # test_assert_regexp - Perform a test and assert that its result matches a regexp
#
! # $file The name of the file invoking the test
! # $line The line in the $file where the test can be found
! # $test The result of the test that was just run
! # $expected The expected result in the form of a regexp
! # $context (Optional) String containing extra context information
#
# Example: test_assert_regexp( function(parameter), '^result' )
***************
*** 151,188 ****
if ( $test =~ /$pattern/ ) {
! # This works by reading the entire suite into the $suite variable
! # and then changing calls to test_assert_equal so that they include
! # the line number and the file they are from, then the $suite is
! # evaluated
! my $current_test_count = $test_count;
! my $current_error_count = $test_failures;
!
! print "\nRunning $test... ";
! flush STDOUT;
! $fail_messages = '';
! my $suite;
! my $ln = 0;
! open SUITE, "<$test";
! while (<SUITE>) {
! my $line = $_;
! $ln += 1;
! $line =~ s/(test_assert_regexp\()/$1 '$test', $ln,/g;
! $line =~ s/(test_assert_equal\()/$1 '$test', $ln,/g;
! $line =~ s/(test_assert\()/$1 '$test', $ln,/g;
! $suite .= $line;
! }
! close SUITE;
! if ( !defined( eval $suite ) ) {
print "Error in $test: $@";
$code = 1;
! }
!
! if ( $test_failures > $current_error_count ) {
! print "failed (" . ( $test_count - $current_test_count ) . " ok, " . ( $test_failures - $current_error_count ) . " failed)\n";
! print $fail_messages . "\n";
$code = 1;
! } else {
! print "ok (" . ( $test_count - $current_test_count ) . " ok)";
! }
}
}
--- 151,188 ----
if ( $test =~ /$pattern/ ) {
! # This works by reading the entire suite into the $suite variable
! # and then changing calls to test_assert_equal so that they include
! # the line number and the file they are from, then the $suite is
! # evaluated
! my $current_test_count = $test_count;
! my $current_error_count = $test_failures;
!
! print "\nRunning $test... ";
! flush STDOUT;
! $fail_messages = '';
! my $suite;
! my $ln = 0;
! open SUITE, "<$test";
! while (<SUITE>) {
! my $line = $_;
! $ln += 1;
! $line =~ s/(test_assert_regexp\()/$1 '$test', $ln,/g;
! $line =~ s/(test_assert_equal\()/$1 '$test', $ln,/g;
! $line =~ s/(test_assert\()/$1 '$test', $ln,/g;
! $suite .= $line;
! }
! close SUITE;
! if ( !defined( eval $suite ) ) {
print "Error in $test: $@";
$code = 1;
! }
!
! if ( $test_failures > $current_error_count ) {
! print "failed (" . ( $test_count - $current_test_count ) . " ok, " . ( $test_failures - $current_error_count ) . " failed)\n";
! print $fail_messages . "\n";
$code = 1;
! } else {
! print "ok (" . ( $test_count - $current_test_count ) . " ok)";
! }
}
}
|
|
From: <jgr...@us...> - 2003-07-26 18:09:07
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv13115/Classifier
Modified Files:
MailParse.pm
Log Message:
Clean up code, remove the use of elsif since it messes with the coverage tool
Index: MailParse.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/MailParse.pm,v
retrieving revision 1.148
retrieving revision 1.149
diff -C2 -d -r1.148 -r1.149
*** MailParse.pm 22 Jul 2003 19:13:21 -0000 1.148
--- MailParse.pm 26 Jul 2003 18:09:05 -0000 1.149
***************
*** 532,538 ****
# Tags with src attributes
! if ( ( $attribute =~ /^src$/i ) &&
( ( $tag =~ /^img|frame|iframe$/i )
! || ( $tag =~ /^script$/i && $parse_script_uri ) ) ) {
# "CID:" links refer to an origin-controlled attachment to a html email.
--- 532,538 ----
# Tags with src attributes
! if ( ( $attribute =~ /^src$/i ) && # PROFILE BLOCK START
( ( $tag =~ /^img|frame|iframe$/i )
! || ( $tag =~ /^script$/i && $parse_script_uri ) ) ) { # PROFILE BLOCK STOP
# "CID:" links refer to an origin-controlled attachment to a html email.
***************
*** 743,805 ****
$host = "$1$3";
$hostform = "name";
! } elsif ( $url =~ /(([^:\/])+)/ ) {
! # Some other hostname format found, maybe
! # Read here for reference: http://www.pc-help.org/obscure.htm
! # Go here for comparison: http://www.samspade.org/t/url
! my $host_candidate = $1; # save the possible hostname
! my %quads; # stores discovered IP address
! # temporary values
! my $quad = 1;
! my $number;
! #iterate through the possible hostname, build dotted quad format
! while ($host_candidate =~ s/\G^((0x)[0-9A-Fa-f]+|0[0-7]+|[0-9]+)(\.)?//) {
! my $hex = $2;
! my $quad_candidate = $1; # possible IP quad(s)
! my $more_dots = $3;
! if (defined $hex) {
! # hex number
! # trim arbitrary octets that are greater than most significant bit
! $quad_candidate =~ s/.*(([0-9A-F][0-9A-F]){4})$/$1/i;
! $number = hex( $quad_candidate );
! } elsif ( $quad_candidate =~ /^0([0-7]+)/ ) {
! # octal number
! $number = oct($1);
! } else {
! # assume decimal number
! $number = int($quad_candidate);
! # deviates from the obscure.htm document here, no current browsers overflow
! }
! # No more IP dots?
! if (!defined $more_dots) {
! # Expand final decimal/octal/hex to extra quads
! while ($quad <= 4) {
! my $shift = ((4 - $quad) * 8);
! $quads{$quad} = ($number & (hex("0xFF") << $shift) ) >> $shift;
! $quad++;
}
! } else {
! # Just plug the quad in, no overflow allowed
! $quads{$quad} = $number if ($number < 256);
! $quad++;
}
! last if ($quad > 4);
! }
! $host_candidate =~ s/\r|\n|$//g;
! if ( $host_candidate eq '' && defined $quads{1} && defined $quads{2} && defined $quads{3} && defined $quads{4} && !defined $quads{5} ) {
! #we did actually find an IP address, and not some fake
! $hostform = "ip";
! $host = "$quads{1}.$quads{2}.$quads{3}.$quads{4}";
! $url =~ s/(([^:\/])+)//;
}
}
--- 743,834 ----
$host = "$1$3";
$hostform = "name";
! } else {
! if ( $url =~ /(([^:\/])+)/ ) {
! # Some other hostname format found, maybe
! # Read here for reference: http://www.pc-help.org/obscure.htm
! # Go here for comparison: http://www.samspade.org/t/url
! # save the possible hostname
! my $host_candidate = $1;
! # stores discovered IP address
! my %quads;
! # temporary values
! my $quad = 1;
! my $number;
! # iterate through the possible hostname, build dotted quad format
! while ($host_candidate =~ s/\G^((0x)[0-9A-Fa-f]+|0[0-7]+|[0-9]+)(\.)?//) {
! my $hex = $2;
!
! # possible IP quad(s)
!
! my $quad_candidate = $1;
! my $more_dots = $3;
!
! if (defined $hex) {
!
! # hex number
! # trim arbitrary octets that are greater than most significant bit
!
! $quad_candidate =~ s/.*(([0-9A-F][0-9A-F]){4})$/$1/i;
! $number = hex( $quad_candidate );
! } else {
! if ( $quad_candidate =~ /^0([0-7]+)/ ) {
!
! # octal number
!
! $number = oct($1);
! } else {
!
! # assume decimal number
! # deviates from the obscure.htm document here, no current browsers overflow
!
! $number = int($quad_candidate);
! }
}
!
! # No more IP dots?
!
! if ( !defined( $more_dots ) ) {
!
! # Expand final decimal/octal/hex to extra quads
!
! while ( $quad <= 4 ) {
! my $shift = ((4 - $quad) * 8);
! $quads{$quad} = ($number & (hex("0xFF") << $shift) ) >> $shift;
! $quad += 1;
! }
! } else {
!
! # Just plug the quad in, no overflow allowed
!
! $quads{$quad} = $number if ($number < 256);
! $quad += 1;
! }
!
! last if ( $quad > 4 );
}
! $host_candidate =~ s/\r|\n|$//g;
! if ( ( $host_candidate eq '' ) && # PROFILE BLOCK START
! defined( $quads{1} ) &&
! defined( $quads{2} ) &&
! defined( $quads{3} ) &&
! defined( $quads{4} ) &&
! !defined( $quads{5} ) ) { # PROFILE BLOCK STOP
! # we did actually find an IP address, and not some fake
!
! $hostform = "ip";
! $host = "$quads{1}.$quads{2}.$quads{3}.$quads{4}";
! $url =~ s/(([^:\/])+)//;
! }
}
}
***************
*** 1302,1310 ****
$decode_it = decode_base64( $2 );
$mystring =~ s/=\?[\w-]+\?B\?(.*?)\?=/$decode_it/i;
! } elsif ($1 eq "Q") {
! $decode_it = $2;
! $decode_it =~ s/\_/=20/g;
! $decode_it = decode_qp( $decode_it );
! $mystring =~ s/=\?[\w-]+\?Q\?(.*?)\?=/$decode_it/i;
}
}
--- 1331,1341 ----
$decode_it = decode_base64( $2 );
$mystring =~ s/=\?[\w-]+\?B\?(.*?)\?=/$decode_it/i;
! } else {
! if ($1 eq "Q") {
! $decode_it = $2;
! $decode_it =~ s/\_/=20/g;
! $decode_it = decode_qp( $decode_it );
! $mystring =~ s/=\?[\w-]+\?Q\?(.*?)\?=/$decode_it/i;
! }
}
}
|
|
From: <jgr...@us...> - 2003-07-26 17:41:30
|
Update of /cvsroot/popfile/engine
In directory sc8-pr-cvs1:/tmp/cvs-serv5569
Modified Files:
coverage.pl
Log Message:
HTML colored coverage output now include line numbers
Index: coverage.pl
===================================================================
RCS file: /cvsroot/popfile/engine/coverage.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** coverage.pl 26 Jul 2003 17:35:25 -0000 1.7
--- coverage.pl 26 Jul 2003 17:41:26 -0000 1.8
***************
*** 106,109 ****
--- 106,116 ----
s/</</g;
s/>/>/g;
+ print HTML "<font color=$color>";
+ my $length = 5 - length("$line");
+ while ( $length > 0 ) {
+ print HTML " ";
+ $length -= 1;
+ }
+ print HTML "$line </font>";
print HTML "<span style=\"background: $block\"> </span><font color=$color>$_</font>";
}
|
|
From: <jgr...@us...> - 2003-07-26 17:35:27
|
Update of /cvsroot/popfile/engine
In directory sc8-pr-cvs1:/tmp/cvs-serv4770
Modified Files:
coverage.pl
Log Message:
Small fix to coverage tool to correctly convert & to &
Index: coverage.pl
===================================================================
RCS file: /cvsroot/popfile/engine/coverage.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** coverage.pl 26 Jul 2003 17:25:46 -0000 1.6
--- coverage.pl 26 Jul 2003 17:35:25 -0000 1.7
***************
*** 103,106 ****
--- 103,107 ----
my $color = (defined($count{$file}{executed}{$line}) && ($count{$file}{executed}{$line}==0))?"red":"green";
my $block = ($color eq 'red')?"red":"white";
+ s/&/&/g;
s/</</g;
s/>/>/g;
|
|
From: <jgr...@us...> - 2003-07-26 17:32:30
|
Update of /cvsroot/popfile/engine/tests In directory sc8-pr-cvs1:/tmp/cvs-serv4451/tests Modified Files: TestConfiguration.tst Log Message: Restore POPFile::Configuration test suite to 100% line coverage with test for load_configuration Index: TestConfiguration.tst =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestConfiguration.tst,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestConfiguration.tst 15 Jul 2003 02:49:22 -0000 1.5 --- TestConfiguration.tst 26 Jul 2003 17:32:27 -0000 1.6 *************** *** 7,10 **** --- 7,12 ---- # --------------------------------------------------------------------------------------------- + unlink 'popfile.cfg'; + use POPFile::Configuration; use POPFile::MQ; *************** *** 65,69 **** test_assert( !$c->check_pid_() ); - # disable logging --- 67,70 ---- *************** *** 104,107 **** --- 105,143 ---- close STDERR; $c->stop(); + + # Check that the popfile.cfg was written + + open FILE, "<popfile.cfg"; + my $line = <FILE>; + test_assert_regexp( $line, 'GLOBAL_debug 0' ); + $line = <FILE>; + test_assert_regexp( $line, 'GLOBAL_download_count 0' ); + $line = <FILE>; + test_assert_regexp( $line, 'GLOBAL_msgdir messages/' ); + $line = <FILE>; + test_assert_regexp( $line, 'GLOBAL_subject 1' ); + $line = <FILE>; + test_assert_regexp( $line, 'GLOBAL_timeout 60' ); + $line = <FILE>; + test_assert_regexp( $line, 'GLOBAL_xpl 1' ); + $line = <FILE>; + test_assert_regexp( $line, 'GLOBAL_xtc 1' ); + $line = <FILE>; + test_assert_regexp( $line, 'config_piddir ../tests/' ); + $line = <FILE>; + test_assert_regexp( $line, 'logger_logdir ./' ); + $line = <FILE>; + test_assert_regexp( $line, 'testparam testvalue' ); + $line = <FILE>; + close FILE; + + # Now add a parameter and reload the configuration + + open FILE, ">>popfile.cfg"; + print FILE "testparam2 testvalue2\n"; + close FILE; + + $c->load_configuration(); + test_assert_equal( $c->parameter( 'testparam2' ), 'testvalue2' ); # Check that parameter upgrading works |
|
From: <jgr...@us...> - 2003-07-26 17:25:49
|
Update of /cvsroot/popfile/engine
In directory sc8-pr-cvs1:/tmp/cvs-serv3382
Modified Files:
coverage.pl
Log Message:
Minor fix to coverage tool to convert < and > in HTML to entities
Index: coverage.pl
===================================================================
RCS file: /cvsroot/popfile/engine/coverage.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** coverage.pl 26 Jul 2003 14:42:18 -0000 1.5
--- coverage.pl 26 Jul 2003 17:25:46 -0000 1.6
***************
*** 103,106 ****
--- 103,108 ----
my $color = (defined($count{$file}{executed}{$line}) && ($count{$file}{executed}{$line}==0))?"red":"green";
my $block = ($color eq 'red')?"red":"white";
+ s/</</g;
+ s/>/>/g;
print HTML "<span style=\"background: $block\"> </span><font color=$color>$_</font>";
}
|
|
From: <jgr...@us...> - 2003-07-26 17:14:45
|
Update of /cvsroot/popfile/engine/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv1930/tests
Modified Files:
TestProxy.tst
Log Message:
Completed test suite for Proxy::Proxy, now have 100% line coverage
Index: TestProxy.tst
===================================================================
RCS file: /cvsroot/popfile/engine/tests/TestProxy.tst,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** TestProxy.tst 26 Jul 2003 16:14:08 -0000 1.9
--- TestProxy.tst 26 Jul 2003 17:14:43 -0000 1.10
***************
*** 267,270 ****
--- 267,342 ----
close TEMP;
+ # Test get_response_ with undefined mail server
+
+ $sp->{connection_timeout_error_} = 'timeout error';
+ open TEMP, ">temp.tmp";
+ test_assert_regexp( $sp->get_response_( undef, \*TEMP, "HELLO" ), 'timeout error' );
+ close TEMP;
+ open TEMP, "<temp.tmp";
+ $line = <TEMP>;
+ test_assert_regexp( $line, 'timeout error' );
+ close TEMP;
+
+ # Test get_response_ with timeout
+
+ $sp->global_config_( 'timeout', 1 );
+ open TEMP, ">temp.tmp";
+ test_assert_regexp( $sp->get_response_( $client, \*TEMP, "HELLO" ), 'timeout error' );
+ close TEMP;
+ open TEMP, "<temp.tmp";
+ $line = <TEMP>;
+ test_assert_regexp( $line, 'timeout error' );
+ close TEMP;
+
+ # Test get_response_ with null response not allowed
+
+ open TEMP, ">temp.tmp";
+ test_assert_equal( $sp->get_response_( $client, \*TEMP, "HELLO", 1 ), '' );
+ close TEMP;
+ open TEMP, "<temp.tmp";
+ $line = <TEMP>;
+ test_assert( !defined( $line ) );
+ close TEMP;
+
+ # Test get_response_ with valid response
+
+ $sp->send( 'HELLO response');
+ $sp->service_server();
+
+ open TEMP, ">temp.tmp";
+ test_assert_regexp( $sp->get_response_( $client, \*TEMP, "HELLO" ), 'HELLO response' );
+ close TEMP;
+ open TEMP, "<temp.tmp";
+ $line = <TEMP>;
+ test_assert_regexp( $line, 'HELLO response' );
+ close TEMP;
+
+ # Test echo_response_ with good response
+
+ $sp->send( 'GOOD');
+ $sp->service_server();
+
+ $sp->{good_response_} = 'GOOD';
+ open TEMP, ">temp.tmp";
+ test_assert( $sp->echo_response_( $client, \*TEMP, "HOWRU?" ) );
+ close TEMP;
+ open TEMP, "<temp.tmp";
+ $line = <TEMP>;
+ test_assert_regexp( $line, 'GOOD' );
+ close TEMP;
+
+ # Test echo_response_ with bad response
+
+ $sp->send( 'BAD');
+ $sp->service_server();
+
+ open TEMP, ">temp.tmp";
+ test_assert( !$sp->echo_response_( $client, \*TEMP, "HOWRU?" ) );
+ close TEMP;
+ open TEMP, "<temp.tmp";
+ $line = <TEMP>;
+ test_assert_regexp( $line, 'BAD' );
+ close TEMP;
+
# Check that we receive the messages sent up the pipe
***************
*** 400,401 ****
--- 472,527 ----
@kids = keys %{$sp->{children__}};
}
+
+ # Test that verify_connected_ does what we expect
+
+ $sp = new Test::SimpleProxy;
+
+ $sp->configuration( $c );
+ $sp->mq( $mq );
+ $sp->logger( $l );
+
+ $sp->forker( \&forker );
+ $sp->pipeready( \&pipeready );
+
+ $sp->initialize();
+ $sp->config_( 'port', $port );
+
+ $sp->{connection_failed_error_} = 'failed error';
+
+ undef $client;
+ open TEMP, ">temp.tmp";
+ test_assert( !defined( $sp->verify_connected_( $client, \*TEMP, 'localhost', $port ) ) );
+ close TEMP;
+ open TEMP, "<temp.tmp";
+ $line = <TEMP>;
+ test_assert_regexp( $line, 'failed error' );
+ test_assert_regexp( $line, 'localhost' );
+ test_assert_regexp( $line, "$port" );
+ close TEMP;
+
+ test_assert( $sp->start() );
+
+ my $sp2 = new Test::SimpleProxy;
+
+ $sp2->configuration( $c );
+ $sp2->mq( $mq );
+ $sp2->logger( $l );
+
+ $sp2->forker( \&forker );
+ $sp2->pipeready( \&pipeready );
+
+ $sp2->initialize();
+ $sp2->config_( 'port', 0 );
+
+ open (STDERR, ">stdout.tmp");
+ test_assert( !$sp2->start() );
+ close STDERR;
+ open TEMP, "<stdout.tmp";
+ $line = <TEMP>;
+ $line = <TEMP>;
+ $line = <TEMP>;
+ test_assert_regexp( $line, "Couldn't start the simple proxy" );
+ close TEMP;
+
+ $sp->stop();
+ $sp2->stop();
\ No newline at end of file
|
|
From: <jgr...@us...> - 2003-07-26 17:14:45
|
Update of /cvsroot/popfile/engine/Test
In directory sc8-pr-cvs1:/tmp/cvs-serv1930/Test
Modified Files:
SimpleProxy.pm
Log Message:
Completed test suite for Proxy::Proxy, now have 100% line coverage
Index: SimpleProxy.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Test/SimpleProxy.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** SimpleProxy.pm 26 Jul 2003 16:14:08 -0000 1.6
--- SimpleProxy.pm 26 Jul 2003 17:14:43 -0000 1.7
***************
*** 128,132 ****
my $handle = $self->{remote_client__};
if ( defined( $handle ) ) {
! $self->tee_( $handle, "Welcome$eol" );
}
}
--- 128,134 ----
my $handle = $self->{remote_client__};
if ( defined( $handle ) ) {
! $self->tee_( $handle, "Welcome" );
! $self->tee_( $handle, "To The Jungle$eol" );
!
}
}
|
|
From: <jgr...@us...> - 2003-07-26 17:14:45
|
Update of /cvsroot/popfile/engine/Proxy
In directory sc8-pr-cvs1:/tmp/cvs-serv1930/Proxy
Modified Files:
NNTP.pm Proxy.pm
Log Message:
Completed test suite for Proxy::Proxy, now have 100% line coverage
Index: NNTP.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Proxy/NNTP.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** NNTP.pm 9 Jul 2003 21:15:39 -0000 1.13
--- NNTP.pm 26 Jul 2003 17:14:42 -0000 1.14
***************
*** 290,294 ****
if ( $ command =~ /^ *$/ ) {
if ( $news && $news->connected ) {
! $self->get_response_($news, $client, $command, '',1);
$self->flush_extra_( $news, $client, 0 );
next;
--- 290,294 ----
if ( $ command =~ /^ *$/ ) {
if ( $news && $news->connected ) {
! $self->get_response_($news, $client, $command, 1);
$self->flush_extra_( $news, $client, 0 );
next;
Index: Proxy.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Proxy/Proxy.pm,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** Proxy.pm 26 Jul 2003 15:40:19 -0000 1.26
--- Proxy.pm 26 Jul 2003 17:14:42 -0000 1.27
***************
*** 94,98 ****
my $port = $self->config_( 'port' );
my $name = $self->name();
! print STDERR <<EOM;
\nCouldn't start the $name proxy because POPFile could not bind to the
--- 94,98 ----
my $port = $self->config_( 'port' );
my $name = $self->name();
! print STDERR <<EOM; # PROFILE BLOCK START
\nCouldn't start the $name proxy because POPFile could not bind to the
***************
*** 103,107 ****
EOM
!
return 0;
}
--- 103,107 ----
EOM
! # PROFILE BLOCK STOP
return 0;
}
***************
*** 432,436 ****
# $client The local mail client (created with IO::) that needs the response
# $command The text of the command to send (we add an EOL)
- # $error The error string if the response fails
# $null_resp Allow a null response
#
--- 432,435 ----
***************
*** 440,451 ****
# ---------------------------------------------------------------------------------------------
- #TODO: Implement or remove $error as defined in interface above
sub get_response_
{
! my ( $self, $mail, $client, $command, $error, $null_resp ) = @_;
$null_resp = 0 if (!defined $null_resp);
! unless ( $mail ) {
# $mail is undefined - return an error intead of crashing
$self->tee_( $client, "$self->{connection_timeout_error_}$eol" );
--- 439,449 ----
# ---------------------------------------------------------------------------------------------
sub get_response_
{
! my ( $self, $mail, $client, $command, $null_resp ) = @_;
$null_resp = 0 if (!defined $null_resp);
! unless ( defined($mail) && $mail->connected ) {
# $mail is undefined - return an error intead of crashing
$self->tee_( $client, "$self->{connection_timeout_error_}$eol" );
***************
*** 459,487 ****
# Retrieve a single string containing the response
- if ( $mail->connected ) {
- my $selector = new IO::Select( $mail );
- my ($ready) = $selector->can_read( (!$null_resp?$self->global_config_( 'timeout' ):.5) );
! if ( ( defined( $ready ) ) && ( $ready == $mail ) ) {
! $response = <$mail>;
! if ( $response ) {
! # Echo the response up to the mail client
! $self->tee_( $client, $response );
! return $response;
! }
! }
! if (!$null_resp) {
! # An error has occurred reading from the mail server
! $self->tee_( $client, "$self->{connection_timeout_error_}$eol" );
! return $self->{connection_timeout_error_};
! } else {
! $self->tee_($client, "");
! return "";
}
}
! return $response;
}
--- 457,483 ----
# Retrieve a single string containing the response
! my $selector = new IO::Select( $mail );
! my ($ready) = $selector->can_read( (!$null_resp?$self->global_config_( 'timeout' ):.5) );
! if ( ( defined( $ready ) ) && ( $ready == $mail ) ) {
! $response = <$mail>;
! if ( $response ) {
! # Echo the response up to the mail client
! $self->tee_( $client, $response );
! return $response;
}
}
! if ( !$null_resp ) {
! # An error has occurred reading from the mail server
!
! $self->tee_( $client, "$self->{connection_timeout_error_}$eol" );
! return $self->{connection_timeout_error_};
! } else {
! $self->tee_($client, "");
! return "";
! }
}
|
|
From: <jgr...@us...> - 2003-07-26 16:14:11
|
Update of /cvsroot/popfile/engine/Test
In directory sc8-pr-cvs1:/tmp/cvs-serv24810/Test
Modified Files:
SimpleProxy.pm
Log Message:
Add tests for Proxy::Proxy::flush_extra_ and Proxy::Proxy receipt and posting of messages from child on pipe
Index: SimpleProxy.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Test/SimpleProxy.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** SimpleProxy.pm 26 Jul 2003 15:40:19 -0000 1.5
--- SimpleProxy.pm 26 Jul 2003 16:14:08 -0000 1.6
***************
*** 59,63 ****
if ( defined( $self->{remote_server__} ) ) {
close $self->{remote_server__};
! close $self->{remote_client__};
undef $self->{remote_server__};
undef $self->{remote_selector__};
--- 59,63 ----
if ( defined( $self->{remote_server__} ) ) {
close $self->{remote_server__};
! close $self->{remote_client__} if ( defined( $self->{remote_client__} ) );
undef $self->{remote_server__};
undef $self->{remote_selector__};
***************
*** 150,153 ****
--- 150,159 ----
$self->log_( "Child started" );
+
+ # Used to test that we get pipe messages
+
+ print $pipe "CLASS:classification$eol";
+ print $pipe "NEWFL:newfile$eol";
+ print $pipe "LOGIN:username$eol";
# Connect to the simple server that
|
|
From: <jgr...@us...> - 2003-07-26 16:14:11
|
Update of /cvsroot/popfile/engine/tests In directory sc8-pr-cvs1:/tmp/cvs-serv24810/tests Modified Files: TestProxy.tst Log Message: Add tests for Proxy::Proxy::flush_extra_ and Proxy::Proxy receipt and posting of messages from child on pipe Index: TestProxy.tst =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestProxy.tst,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TestProxy.tst 26 Jul 2003 15:40:19 -0000 1.8 --- TestProxy.tst 26 Jul 2003 16:14:08 -0000 1.9 *************** *** 245,248 **** --- 245,281 ---- test_assert_regexp( $line, 'after' ); + # Test flush_extra_ + + $sp->send( 'flush1' ); + $sp->service_server(); + open TEMP, ">temp.tmp"; + test_assert_regexp( $sp->flush_extra_( $client, \*TEMP ), 'flush1' ); + close TEMP; + open TEMP, "<temp.tmp"; + $line = <TEMP>; + test_assert_regexp( $line, 'flush1' ); + close TEMP; + + $sp->send( 'flush2' ); + $sp->service_server(); + open TEMP, ">temp.tmp"; + test_assert_regexp( $sp->flush_extra_( $client, \*TEMP, 1 ), 'flush2' ); + close TEMP; + open TEMP, "<temp.tmp"; + $line = <TEMP>; + test_assert( !defined( $line ) ); + close TEMP; + + # Check that we receive the messages sent up the pipe + + use Test::MQReceiver; + my $r = new Test::MQReceiver; + + # Register three different message types + + $mq->register( 'CLASS', $r ); + $mq->register( 'NEWFL', $r ); + $mq->register( 'LOGIN', $r ); + # Close down the child process *************** *** 263,266 **** --- 296,312 ---- $sp->stop(); + + $mq->service(); + my @messages = $r->read(); + test_assert_equal( $#messages, 2 ); + test_assert_equal( $messages[0][0], 'LOGIN' ); + test_assert_equal( $messages[0][1], 'username' ); + test_assert_equal( $messages[0][2], '' ); + test_assert_equal( $messages[1][0], 'NEWFL' ); + test_assert_equal( $messages[1][1], 'newfile' ); + test_assert_equal( $messages[1][2], '' ); + test_assert_equal( $messages[2][0], 'CLASS' ); + test_assert_equal( $messages[2][1], 'classification' ); + test_assert_equal( $messages[3][2], '' ); # Make sure that stop will close off the child pipes |
|
From: <jgr...@us...> - 2003-07-26 15:40:22
|
Update of /cvsroot/popfile/engine/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv19821/tests
Modified Files:
TestProxy.tst
Log Message:
Improve test suite for Proxy::Proxy
Index: TestProxy.tst
===================================================================
RCS file: /cvsroot/popfile/engine/tests/TestProxy.tst,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** TestProxy.tst 21 Jul 2003 19:54:26 -0000 1.7
--- TestProxy.tst 26 Jul 2003 15:40:19 -0000 1.8
***************
*** 105,109 ****
$sp->config_( 'port', $port );
test_assert_equal( $sp->start(), 1 );
! test_assert( $sp->start_server() );
# Now connect a socket to the proxy through which
--- 105,109 ----
$sp->config_( 'port', $port );
test_assert_equal( $sp->start(), 1 );
! test_assert_equal( $sp->start_server(), 1 );
# Now connect a socket to the proxy through which
***************
*** 247,250 ****
--- 247,252 ----
# Close down the child process
+ $sp->send( '__POPFILE__ABORT__CHILD__' );
+ $sp->service_server();
close $client;
$sp->stop_server();
***************
*** 254,261 ****
my @kids = keys %{$sp->{children__}};
! if ( $#kids >= 0 ) {
$sp->reaper();
@kids = keys %{$sp->{children__}};
}
! select( undef, undef, undef, 0.25 );
--- 256,355 ----
my @kids = keys %{$sp->{children__}};
! while ( $#kids >= 0 ) {
$sp->reaper();
+ select( undef, undef, undef, 0.25 );
@kids = keys %{$sp->{children__}};
}
! $sp->stop();
!
! # Make sure that stop will close off the child pipes
!
! $sp = new Test::SimpleProxy;
!
! $sp->configuration( $c );
! $sp->mq( $mq );
! $sp->logger( $l );
!
! $sp->forker( \&forker );
! $sp->pipeready( \&pipeready );
!
! $sp->initialize();
! $sp->config_( 'port', $port );
!
! test_assert_equal( $sp->start(), 1 );
! test_assert_equal( $sp->start_server(), 1 );
! $client = IO::Socket::INET->new(
! Proto => "tcp",
! PeerAddr => 'localhost',
! PeerPort => $port );
! $sp->service();
! test_assert( defined( $client ) );
! test_assert( $client->connected );
! $sp->service();
! select( undef, undef, undef, 0.1 );
! $sp->service_server();
! select( undef, undef, undef, 0.1 );
! @kids = keys %{$sp->{children__}};
! my %tmp = %{$sp->{children__}};
! test_assert_equal( $#kids, 0 );
! $sp->stop_server();
! $sp->stop();
! @kids = keys %{$sp->{children__}};
! test_assert_equal( $#kids, -1 );
! print $client "__POPFILE__ABORT__CHILD__\n";
! close $client;
!
! %{$sp->{children__}} = %tmp;
! @kids = keys %{$sp->{children__}};
! while ( $#kids >= 0 ) {
! $sp->reaper();
! select( undef, undef, undef, 0.25 );
! @kids = keys %{$sp->{children__}};
! }
!
! # Make sure that forked will close off the child pipes
!
! $sp = new Test::SimpleProxy;
!
! $sp->configuration( $c );
! $sp->mq( $mq );
! $sp->logger( $l );
!
! $sp->forker( \&forker );
! $sp->pipeready( \&pipeready );
!
! $sp->initialize();
! $sp->config_( 'port', $port );
!
! test_assert_equal( $sp->start(), 1 );
! test_assert_equal( $sp->start_server(), 1 );
! $client = IO::Socket::INET->new(
! Proto => "tcp",
! PeerAddr => 'localhost',
! PeerPort => $port );
! $sp->service();
! test_assert( defined( $client ) );
! test_assert( $client->connected );
! $sp->service();
! select( undef, undef, undef, 0.1 );
! $sp->service_server();
! select( undef, undef, undef, 0.1 );
! @kids = keys %{$sp->{children__}};
! test_assert_equal( $#kids, 0 );
! %tmp = %{$sp->{children__}};
! $sp->forked();
! @kids = keys %{$sp->{children__}};
! test_assert_equal( $#kids, -1 );
! $sp->stop_server();
! $sp->stop();
! print $client "__POPFILE__ABORT__CHILD__\n";
! close $client;
!
! %{$sp->{children__}} = %tmp;
! @kids = keys %{$sp->{children__}};
! while ( $#kids >= 0 ) {
! $sp->reaper();
! select( undef, undef, undef, 0.25 );
! @kids = keys %{$sp->{children__}};
! }
|
|
From: <jgr...@us...> - 2003-07-26 15:40:22
|
Update of /cvsroot/popfile/engine/Test
In directory sc8-pr-cvs1:/tmp/cvs-serv19821/Test
Modified Files:
SimpleProxy.pm
Log Message:
Improve test suite for Proxy::Proxy
Index: SimpleProxy.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Test/SimpleProxy.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** SimpleProxy.pm 21 Jul 2003 19:54:40 -0000 1.4
--- SimpleProxy.pm 26 Jul 2003 15:40:19 -0000 1.5
***************
*** 57,61 ****
my ( $self ) = @_;
! close $self->{remote_server__} if ( defined( $self->{remote_server__} ) );
}
--- 57,66 ----
my ( $self ) = @_;
! if ( defined( $self->{remote_server__} ) ) {
! close $self->{remote_server__};
! close $self->{remote_client__};
! undef $self->{remote_server__};
! undef $self->{remote_selector__};
! }
}
***************
*** 111,115 ****
if ( defined( $self->{remote_client_selector__}->can_read(0) ) ) {
my $line = <$handle>;
! $self->{received__} .= $line;
}
} else {
--- 116,122 ----
if ( defined( $self->{remote_client_selector__}->can_read(0) ) ) {
my $line = <$handle>;
! if ( defined( $line ) ) {
! $self->{received__} .= $line;
! }
}
} else {
***************
*** 154,161 ****
my $client_selector = new IO::Select( $client );
! while ( $client->connected ) {
if ( defined( $remote_selector->can_read(0) ) ) {
my $line = <$remote>;
if ( defined( $line ) ) {
print $client $line;
} else {
--- 161,169 ----
my $client_selector = new IO::Select( $client );
! while ( defined($client) && $client->connected ) {
if ( defined( $remote_selector->can_read(0) ) ) {
my $line = <$remote>;
if ( defined( $line ) ) {
+ last if ( $line =~ /__POPFILE__ABORT__CHILD__/ );
print $client $line;
} else {
***************
*** 165,168 ****
--- 173,177 ----
if ( defined( $client_selector->can_read(0) ) ) {
my $line = <$client>;
+ last if ( $line =~ /__POPFILE__ABORT__CHILD__/ );
print $remote $line;
}
***************
*** 171,174 ****
--- 180,185 ----
close $remote;
close $pipe;
+
+ $self->log_( "Child stopped" );
}
|
|
From: <jgr...@us...> - 2003-07-26 15:40:22
|
Update of /cvsroot/popfile/engine/Proxy
In directory sc8-pr-cvs1:/tmp/cvs-serv19821/Proxy
Modified Files:
Proxy.pm
Log Message:
Improve test suite for Proxy::Proxy
Index: Proxy.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Proxy/Proxy.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** Proxy.pm 26 Jul 2003 14:59:46 -0000 1.25
--- Proxy.pm 26 Jul 2003 15:40:19 -0000 1.26
***************
*** 134,137 ****
--- 134,138 ----
for my $kid (keys %{$self->{children__}}) {
close $self->{children__}{$kid};
+ delete $self->{children__}{$kid};
}
}
***************
*** 306,309 ****
--- 307,311 ----
for my $kid (keys %{$self->{children__}}) {
close $self->{children__}{$kid};
+ delete $self->{children__}{$kid};
}
}
|
|
From: <jgr...@us...> - 2003-07-26 14:59:50
|
Update of /cvsroot/popfile/engine/POPFile
In directory sc8-pr-cvs1:/tmp/cvs-serv13266/POPFile
Modified Files:
Configuration.pm
Log Message:
Small changes to help the coverage code spot blocks of code that are being executed; make coverage.pl warn if it detects an unterminated PROFILE BLOCK
Index: Configuration.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/Configuration.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** Configuration.pm 14 Jul 2003 23:08:31 -0000 1.23
--- Configuration.pm 26 Jul 2003 14:59:46 -0000 1.24
***************
*** 396,400 ****
'update_check', 'html_update_check',
'ui_port', 'html_port',
! ); # PROFILE BLOCK END
if ( defined( $upgrades{$parameter} ) ) {
--- 396,400 ----
'update_check', 'html_update_check',
'ui_port', 'html_port',
! ); # PROFILE BLOCK STOP
if ( defined( $upgrades{$parameter} ) ) {
|