Update of /cvsroot/http-webtest/HTTP-WebTest-Plugin-DateTest/t
In directory sc8-pr-cvs1:/tmp/cvs-serv21188/t
Modified Files:
01_basic.t in.html
Added Files:
dyn.txt
Log Message:
Preparation for release, more test cases
--- NEW FILE: dyn.txt ---
File generated by 't/01_basic.t', do not edit
START Tue Dec 31 12:16:40 2002 GMT END
EOF
Index: 01_basic.t
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest-Plugin-DateTest/t/01_basic.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** 01_basic.t 26 Dec 2002 21:17:46 -0000 1.2
--- 01_basic.t 31 Dec 2002 15:46:13 -0000 1.3
***************
*** 4,8 ****
#########################
! use Test::More tests => 3;
require 't/utils.pl';
my $loaded = 0;
--- 4,8 ----
#########################
! use Test::More tests => 4;
require 't/utils.pl';
my $loaded = 0;
***************
*** 22,28 ****
test_name => 'datetest',
url => 't/in.html',
! date_start => [ 'starttest', 'Updated:' ],
! date_maxage => [ '9999 weeks', '9999 weeks' ],
! date_end => [ 'endtest', '</p>' ],
} ];
--- 22,28 ----
test_name => 'datetest',
url => 't/in.html',
! date_start => [ 'starttest', 'Updated:', '$Date:' ],
! date_maxage => [ '9999 weeks', '9999 weeks', '9999 weeks' ],
! date_end => [ 'endtest', '</p>', '$' ],
} ];
***************
*** 31,34 ****
--- 31,56 ----
opts => { plugins => ['::DateTest', '::FileRequest'], terse => 'summary' },
check_file => 't/test.out/basic');
+ }
+
+
+ # 4 - dynamically generated file
+ {
+ my $tmdiff = 10 + time() - 1041337000;
+ open(FH, '> t/dyn.txt') or die "Can't create t/dyn.txt, $!";
+ print FH "File generated by 't/01_basic.t', do not edit\n";
+ print FH "START Tue Dec 31 12:16:40 2002 GMT END\nEOF\n";
+ close FH;
+ my $tests = [
+ {
+ test_name => 'datetest',
+ url => 't/dyn.txt',
+ date_start => [ 'START' ],
+ date_maxage => [ "$tmdiff s" ],
+ date_end => [ 'END' ],
+ } ];
+ check_webtest(webtest => $WEBTEST,
+ tests => $tests,
+ opts => { plugins => ['::DateTest', '::FileRequest'], terse => 'summary' },
+ check_file => 't/test.out/dyn.txt');
}
Index: in.html
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest-Plugin-DateTest/t/in.html,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** in.html 12 Sep 2002 13:11:01 -0000 1.1.1.1
--- in.html 31 Dec 2002 15:46:13 -0000 1.2
***************
*** 7,9 ****
--- 7,11 ----
<h1>A Title Here</h1>
+ <p>Play nice with CVS $Date$</p>
+
</html>
|