Update of /cvsroot/http-webtest/HTTP-WebTest/t
In directory usw-pr-cvs1:/tmp/cvs-serv14417/t
Modified Files:
simple.wt 06-parser.t
Log Message:
Updated
Index: simple.wt
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/simple.wt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** simple.wt 29 Jan 2002 03:52:40 -0000 1.2
--- simple.wt 8 Feb 2002 14:06:16 -0000 1.3
***************
*** 17,21 ****
regex_require = (
'Quoted text " test'
! "We can => quote '" )
regex_forbid = ( More = tests
Some @#$%^&* chars
--- 17,25 ----
regex_require = (
'Quoted text " test'
! "We can => quote '"
! "test \""
! 'test \''
! 'test $a'
! 'test @a' )
regex_forbid = ( More = tests
Some @#$%^&* chars
Index: 06-parser.t
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/06-parser.t,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** 06-parser.t 29 Jan 2002 03:52:40 -0000 1.3
--- 06-parser.t 8 Feb 2002 14:06:16 -0000 1.4
***************
*** 13,19 ****
require 't/utils.pl';
! BEGIN { plan tests => 39 }
! # 1-31: check parsing wt script (contain all syntax variants)
{
my $filename = shift;
--- 13,19 ----
require 't/utils.pl';
! BEGIN { plan tests => 43 }
! # 1-35: check parsing wt script (contain all syntax variants)
{
my $filename = shift;
***************
*** 29,32 ****
--- 29,36 ----
ok($tests->[0]{regex_require}[0] eq 'Quoted text " test');
ok($tests->[0]{regex_require}[1] eq 'We can => quote \'');
+ ok($tests->[0]{regex_require}[2] eq 'test "');
+ ok($tests->[0]{regex_require}[3] eq "test '");
+ ok($tests->[0]{regex_require}[4] eq 'test $a');
+ ok($tests->[0]{regex_require}[5] eq 'test @a');
ok($tests->[0]{url} eq 'www.dot.com');
ok($tests->[0]{regex_forbid}[0] eq 'More = tests');
***************
*** 64,80 ****
}
! # 32-39: check error handling for borked wtscript files
! parse_error_check('t/borked1.wt', 't/test.out/borked1.err');
! parse_error_check('t/borked2.wt', 't/test.out/borked2.err');
! parse_error_check('t/borked3.wt', 't/test.out/borked3.err');
! parse_error_check('t/borked4.wt', 't/test.out/borked4.err');
! parse_error_check('t/borked5.wt', 't/test.out/borked5.err');
! parse_error_check('t/borked6.wt', 't/test.out/borked6.err');
! parse_error_check('t/borked7.wt', 't/test.out/borked7.err');
! parse_error_check('t/borked8.wt', 't/test.out/borked8.err');
sub parse_error_check {
! my $wtscript = shift;
! my $check_file = shift;
eval {
--- 68,100 ----
}
! # 36-43: check error handling for borked wtscript files
! parse_error_check(wtscript => 't/borked1.wt',
! check_file => 't/test.out/borked1.err');
! parse_error_check(wtscript => 't/borked2.wt',
! check_file => 't/test.out/borked2.err');
! parse_error_check(wtscript => 't/borked3.wt',
! check_file => 't/test.out/borked3.err');
! parse_error_check(wtscript => 't/borked4.wt',
! check_file => 't/test.out/borked4.err');
! parse_error_check(wtscript => 't/borked5.wt',
! check_file => 't/test.out/borked5.err');
! parse_error_check(wtscript => 't/borked6.wt',
! check_file => 't/test.out/borked6.err');
! {
! my $out_filter = sub {
! $_[0] =~ s/\(eval \d+\)/(eval NN)/;
! };
! parse_error_check(wtscript => 't/borked7.wt',
! check_file => 't/test.out/borked7.err',
! out_filter => $out_filter);
! }
! parse_error_check(wtscript => 't/borked8.wt',
! check_file => 't/test.out/borked8.err');
sub parse_error_check {
! my %param = @_;
! my $wtscript = $param{wtscript};
! my $check_file = $param{check_file};
! my $out_filter = $param{out_filter};
eval {
***************
*** 84,88 ****
if($@) {
my $text = $@;
! compare_output(check_file => $check_file, output_ref => \$text);
} else {
ok(0);
--- 104,112 ----
if($@) {
my $text = $@;
! my @out_filter = $out_filter ? (out_filter => $out_filter) : ();
! canonical_output(output_ref => \$text,
! @out_filter);
! compare_output(check_file => $check_file,
! output_ref => \$text);
} else {
ok(0);
|