[Http-webtest-commits] CVS: HTTP-WebTest/t 02-generic.t,1.6,1.7
Brought to you by:
m_ilya,
richardanderson
From: Ilya M. <m_...@us...> - 2002-02-16 00:36:39
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t In directory usw-pr-cvs1:/tmp/cvs-serv22323/t Modified Files: 02-generic.t Log Message: Pass HTTP::WebTest objects to test parameter subroutines Index: 02-generic.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/02-generic.t,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** 02-generic.t 15 Feb 2002 14:48:42 -0000 1.6 --- 02-generic.t 16 Feb 2002 00:36:35 -0000 1.7 *************** *** 18,22 **** use vars qw($HOSTNAME $PORT $URL); ! BEGIN { plan tests => 21 } # init tests --- 18,22 ---- use vars qw($HOSTNAME $PORT $URL); ! BEGIN { plan tests => 22 } # init tests *************** *** 413,416 **** --- 413,428 ---- $WEBTEST->run_tests($tests1, $opts); ok($value == 3); + } + + # 22: test arguments passed to subroutine test parameter + { + my $webtest = undef; + + my $tests1 = [ { url => abs_url($URL, '/test-file1'), + text_require => sub { $webtest = shift; [] } } ]; + my $opts = { default_report => 'no' }; + + $WEBTEST->run_tests($tests1, $opts); + ok($webtest eq $WEBTEST); } |