Update of /cvsroot/popfile/engine/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv20818
Modified Files:
TestHTML.script TestHTML.tst
Added Files:
TestMailParse024.msg TestMailParse024.wrd TestMailParse025.msg
TestMailParse025.wrd
Log Message:
Tests for new mail parsing that removes invalid HTML tags and pairs
--- NEW FILE: TestMailParse024.msg ---
From: blank
Testing<aaa>invalid<bbb>tags.
Testing<h1234>again. And<ccc class="foo" id="bar">again.
--- NEW FILE: TestMailParse024.wrd ---
header:From 1
from:blank 1
andagain 1
testingagain 1
testinginvalidtags 1
html:invalidtag 4
--- NEW FILE: TestMailParse025.msg ---
From: blank
Empty<b></b>pair.
Empty<i><u></u></i>pairs.
Nonempty<br></br>pair.
--- NEW FILE: TestMailParse025.wrd ---
header:From 1
from:blank 1
emptypair 1
emptypairs 1
nonempty 1
pair 1
html:emptypair 3
Index: TestHTML.script
===================================================================
RCS file: /cvsroot/popfile/engine/tests/TestHTML.script,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TestHTML.script 21 Aug 2003 17:07:05 -0000 1.5
--- TestHTML.script 21 Aug 2003 17:59:18 -0000 1.6
***************
*** 30,35 ****
# The commands are as follows
#
! # URL <url> Set the URL that is to be fetched
! # GET Gets the last set URL
# MATCH <data> Match the return from last URL fetch against the data
# MATCH/ENDMATCH Encloses a block of test to find in the return from the last URL fetch
--- 30,34 ----
# The commands are as follows
#
! # GET <url> Get the URL (note the host and port will be added for you)
# MATCH <data> Match the return from last URL fetch against the data
# MATCH/ENDMATCH Encloses a block of test to find in the return from the last URL fetch
***************
*** 54,59 ****
# of every page
! URL http://127.0.0.1:$port
! GET
# Common TOP parts
--- 53,57 ----
# of every page
! GET /
# Common TOP parts
***************
*** 93,98 ****
# correctly
! URL http://127.0.0.1:$port/history
! GET
MATCH
<td class="menuSelected" align="center">
--- 91,95 ----
# correctly
! GET /history
MATCH
<td class="menuSelected" align="center">
***************
*** 100,105 ****
ENDMATCH
! URL http://127.0.0.1:$port/buckets
! GET
MATCH
<td class="menuSelected" align="center">
--- 97,101 ----
ENDMATCH
! GET /buckets
MATCH
<td class="menuSelected" align="center">
***************
*** 107,112 ****
ENDMATCH
! URL http://127.0.0.1:$port/magnets
! GET
MATCH
<td class="menuSelected" align="center">
--- 103,107 ----
ENDMATCH
! GET /magnets
MATCH
<td class="menuSelected" align="center">
***************
*** 114,119 ****
ENDMATCH
! URL http://127.0.0.1:$port/configuration
! GET
MATCH
<td class="menuSelected" align="center">
--- 109,113 ----
ENDMATCH
! GET /configuration
MATCH
<td class="menuSelected" align="center">
***************
*** 121,126 ****
ENDMATCH
! URL http://127.0.0.1:$port/security
! GET
MATCH
<td class="menuSelected" align="center">
--- 115,119 ----
ENDMATCH
! GET /security
MATCH
<td class="menuSelected" align="center">
***************
*** 128,133 ****
ENDMATCH
! URL http://127.0.0.1:$port/advanced
! GET
MATCH
<td class="menuSelected" align="center">
--- 121,125 ----
ENDMATCH
! GET /advanced
MATCH
<td class="menuSelected" align="center">
***************
*** 180,185 ****
# Configuration Page
! URL http://127.0.0.1:$port/configuration
! GET
# Check skin change
--- 172,176 ----
# Configuration Page
! GET /configuration
# Check skin change
***************
*** 279,288 ****
CONFIGIS GLOBAL_subject 0
! URL http://127.0.0.1:$port/buckets
! GET
MATCH Disabled globally
! URL http://127.0.0.1:$port/configuration
! GET
SETSUBMIT subject 2
INPUTIS subject 1
--- 270,277 ----
CONFIGIS GLOBAL_subject 0
! GET /buckets
MATCH Disabled globally
! GET /configuration
SETSUBMIT subject 2
INPUTIS subject 1
***************
*** 338,342 ****
# TODO Check SMTP chain options
# TODO Check autoupdate
! # TODO Check stastitics sending
# TODO Check password
--- 327,331 ----
# TODO Check SMTP chain options
# TODO Check autoupdate
! # TODO Check statistics sending
# TODO Check password
Index: TestHTML.tst
===================================================================
RCS file: /cvsroot/popfile/engine/tests/TestHTML.tst,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** TestHTML.tst 21 Aug 2003 17:07:05 -0000 1.9
--- TestHTML.tst 21 Aug 2003 17:59:18 -0000 1.10
***************
*** 253,258 ****
$line = interpolate( $line );
! if ( $line =~ /^URL +(.+)$/ ) {
! $url = url( $1 );
next;
}
--- 253,260 ----
$line = interpolate( $line );
! if ( $line =~ /^GET +(.+)$/ ) {
! $url = url( "http://127.0.0.1:$port$1" );
! $content = get($url);
! @forms = HTML::Form->parse( $content, "http://127.0.0.1:$port" );
next;
}
***************
*** 286,295 ****
@forms = HTML::Form->parse( $content, "http://127.0.0.1:$port" );
}
- next;
- }
-
- if ( $line =~ /^GET$/ ) {
- $content = get($url);
- @forms = HTML::Form->parse( $content, "http://127.0.0.1:$port" );
next;
}
--- 288,291 ----
|