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