Update of /cvsroot/http-webtest/HTTP-WebTest/t
In directory usw-pr-cvs1:/tmp/cvs-serv30641/t
Modified Files:
simple.wt 06-parser.t
Log Message:
Support nested brackets syntax
Index: simple.wt
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/simple.wt,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** simple.wt 6 Jun 2002 18:27:44 -0000 1.8
--- simple.wt 22 Jun 2002 20:08:38 -0000 1.9
***************
*** 77,78 ****
--- 77,84 ----
auth = { [ http => 'http://some.proxy.com/' ] }
end_test
+
+ test_name = Nested
+ params = ( upload => ( file => /a/myfile
+ filename => myfile
+ Content-Type => text/plain ) )
+ end_test
Index: 06-parser.t
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/06-parser.t,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** 06-parser.t 15 Jun 2002 23:09:22 -0000 1.14
--- 06-parser.t 22 Jun 2002 20:08:38 -0000 1.15
***************
*** 13,19 ****
require 't/utils.pl';
! BEGIN { plan tests => 59 }
! # 1-51: check parsed wt script (which contains all variants of
# supported syntax)
{
--- 13,19 ----
require 't/utils.pl';
! BEGIN { plan tests => 68 }
! # 1-60: check parsed wt script (which contains all variants of
# supported syntax)
{
***************
*** 31,35 ****
# check $tests
! ok(@$tests == 3);
ok($tests->[0]{test_name} eq 'Some name here');
ok($tests->[0]{auth}[0] eq 'name');
--- 31,35 ----
# check $tests
! ok(@$tests == 4);
ok($tests->[0]{test_name} eq 'Some name here');
ok($tests->[0]{auth}[0] eq 'name');
***************
*** 76,79 ****
--- 76,90 ----
ok($aref->[0] eq 'http');
ok($aref->[1] eq 'http://some.proxy.com/');
+ $aref = $tests->[3]{params};
+ ok(@$aref == 2);
+ ok($aref->[0] eq 'upload');
+ $aref = $aref->[1];
+ ok(@$aref == 6);
+ ok($aref->[0] eq 'file');
+ ok($aref->[1] eq '/a/myfile');
+ ok($aref->[2] eq 'filename');
+ ok($aref->[3] eq 'myfile');
+ ok($aref->[4] eq 'Content-Type');
+ ok($aref->[5] eq 'text/plain');
# check $opts
***************
*** 84,91 ****
ok($opts->{text_forbid}[2] eq 'for list');
ok($opts->{text_forbid}[3] eq 'elements');
! ok($opts->{ignore_case} eq 'no')
}
! # 52-59: check error handling for borked wtscript files
parse_error_check(wtscript => 't/borked1.wt',
check_file => 't/test.out/borked1.err');
--- 95,102 ----
ok($opts->{text_forbid}[2] eq 'for list');
ok($opts->{text_forbid}[3] eq 'elements');
! ok($opts->{ignore_case} eq 'no');
}
! # 61-68: check error handling for borked wtscript files
parse_error_check(wtscript => 't/borked1.wt',
check_file => 't/test.out/borked1.err');
|