Update of /cvsroot/http-webtest/HTTP-WebTest/t
In directory usw-pr-cvs1:/tmp/cvs-serv4068
Modified Files:
06-parser.t
Log Message:
Added more tests for parser
Index: 06-parser.t
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/06-parser.t,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** 06-parser.t 9 Feb 2002 16:21:36 -0000 1.7
--- 06-parser.t 9 Feb 2002 16:25:16 -0000 1.8
***************
*** 13,19 ****
require 't/utils.pl';
! BEGIN { plan tests => 49 }
! # 1-41: check parsed wt script (which contains all variants of
# supported syntax)
{
--- 13,19 ----
require 't/utils.pl';
! BEGIN { plan tests => 54 }
! # 1-46: check parsed wt script (which contains all variants of
# supported syntax)
{
***************
*** 28,31 ****
--- 28,32 ----
ok($tests->[0]{auth}[0] eq 'name');
ok($tests->[0]{auth}[1] eq 'value');
+ ok(@{$tests->[0]{regex_require}} == 8);
ok($tests->[0]{regex_require}[0] eq 'Quoted text " test');
ok($tests->[0]{regex_require}[1] eq 'We can => quote \'');
***************
*** 37,40 ****
--- 38,42 ----
ok($tests->[0]{regex_require}[7] eq 'test @a');
ok($tests->[0]{url} eq 'www.dot.com');
+ ok(@{$tests->[0]{regex_forbid}} == 6);
ok($tests->[0]{regex_forbid}[0] eq 'More = tests');
ok($tests->[0]{regex_forbid}[1] eq 'Some @#$%^&* chars');
***************
*** 48,51 ****
--- 50,56 ----
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}} == 2);
+ ok(@{$tests->[1]{cookie}[0]} == 12);
+ ok(@{$tests->[1]{cookie}[1]} == 12);
ok($tests->[1]{cookie}[0][0] eq '0');
ok($tests->[1]{cookie}[0][1] eq 'webtest');
***************
*** 75,79 ****
}
! # 42-49: check error handling for borked wtscript files
parse_error_check(wtscript => 't/borked1.wt',
check_file => 't/test.out/borked1.err');
--- 80,84 ----
}
! # 47-54: check error handling for borked wtscript files
parse_error_check(wtscript => 't/borked1.wt',
check_file => 't/test.out/borked1.err');
|