Update of /cvsroot/http-webtest/HTTP-WebTest/t
In directory usw-pr-cvs1:/tmp/cvs-serv2099/t
Modified Files:
simple.wt 06-parser.t
Log Message:
Added a couple of new tests for wtscript parser
Index: simple.wt
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/simple.wt,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** simple.wt 8 Feb 2002 14:28:35 -0000 1.4
--- simple.wt 9 Feb 2002 16:15:49 -0000 1.5
***************
*** 12,15 ****
--- 12,18 ----
elements )
+ ignore_case =
+ no
+
test_name = Some name here
# another comment here
***************
*** 30,36 ****
)
auth = ( name => value )
end_test
! test_name = Another name
url = www.tiv.net
cookie = ( 0
--- 33,42 ----
)
auth = ( name => value )
+ ignore_case =yes
+ show_cookies= yes
+ show_html=no
end_test
! test_name = Another name # this is not a comment
url = www.tiv.net
cookie = ( 0
Index: 06-parser.t
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/06-parser.t,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** 06-parser.t 8 Feb 2002 14:28:35 -0000 1.5
--- 06-parser.t 9 Feb 2002 16:15:49 -0000 1.6
***************
*** 13,19 ****
require 't/utils.pl';
! BEGIN { plan tests => 45 }
! # 1-37: check parsing wt script (contain all syntax variants)
{
my $filename = shift;
--- 13,19 ----
require 't/utils.pl';
! BEGIN { plan tests => 49 }
! # 1-41: check parsing wt script (contain all syntax variants)
{
my $filename = shift;
***************
*** 42,46 ****
ok($tests->[0]{regex_forbid}[4] eq 'abcdef 1234');
ok($tests->[0]{regex_forbid}[5] eq ' a b c d \' e f ');
! ok($tests->[1]{test_name} eq 'Another name');
ok($tests->[1]{url} eq 'www.tiv.net');
ok($tests->[1]{cookie}[0][0] eq '0');
--- 42,49 ----
ok($tests->[0]{regex_forbid}[4] eq 'abcdef 1234');
ok($tests->[0]{regex_forbid}[5] eq ' a b c d \' e f ');
! ok($tests->[0]{ignore_case} eq 'yes');
! ok($tests->[0]{show_cookies} eq 'yes');
! ok($tests->[0]{show_html} eq 'no');
! ok($tests->[1]{test_name} eq 'Another name # this is not a comment');
ok($tests->[1]{url} eq 'www.tiv.net');
ok($tests->[1]{cookie}[0][0] eq '0');
***************
*** 68,74 ****
ok($opts->{text_forbid}[2] eq 'for list');
ok($opts->{text_forbid}[3] eq 'elements');
}
! # 38-45: check error handling for borked wtscript files
parse_error_check(wtscript => 't/borked1.wt',
check_file => 't/test.out/borked1.err');
--- 71,78 ----
ok($opts->{text_forbid}[2] eq 'for list');
ok($opts->{text_forbid}[3] eq 'elements');
+ ok($opts->{ignore_case} eq 'no')
}
! # 42-49: check error handling for borked wtscript files
parse_error_check(wtscript => 't/borked1.wt',
check_file => 't/test.out/borked1.err');
|