In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/0cd39adf63bbc345adf2626353dca017ce526563?hp=c3fcf49dfa6136c02c1f42a36f08c75a5f7a5c5c>
- Log ----------------------------------------------------------------- commit 0cd39adf63bbc345adf2626353dca017ce526563 Author: Colin Kuskie <[email protected]> Date: Sat Sep 15 00:51:28 2012 -0700 Refactor t/run/noswitch.t to use test.pl instead of making TAP by hand. M t/run/noswitch.t commit 4e94c743932935b6db5a300ea207f241bdfcd130 Author: Colin Kuskie <[email protected]> Date: Sat Sep 15 00:45:44 2012 -0700 Refactor t/run/switchF.t to use test.pl instead of making TAP by hand. M t/run/switchF.t commit 3f61bd287ed4a45378c0cdef7688e5043655fec7 Author: Colin Kuskie <[email protected]> Date: Sat Sep 15 00:42:36 2012 -0700 Refactor t/run/switchn.t to use test.pl instead of making TAP by hand. M t/run/switchn.t ----------------------------------------------------------------------- Summary of changes: t/run/noswitch.t | 14 +++++++++----- t/run/switchF.t | 11 ++++++++--- t/run/switchn.t | 10 +++++++--- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/t/run/noswitch.t b/t/run/noswitch.t index a902c1f..ff56253 100644 --- a/t/run/noswitch.t +++ b/t/run/noswitch.t @@ -1,12 +1,16 @@ #!./perl BEGIN { - print "1..3\n"; + chdir 't' if -d 't'; + @INC = '../lib'; + require './test.pl'; *ARGV = *DATA; + plan(tests => 3); } -print "ok 1\n"; -print <>; -print "ok 3\n"; + +pass("first test"); +is( scalar <>, "ok 2\n", "read from aliased DATA filehandle"); +pass("last test"); __DATA__ -ok 2 - read from aliased DATA filehandle +ok 2 diff --git a/t/run/switchF.t b/t/run/switchF.t index a6e9031..dcf4409 100644 --- a/t/run/switchF.t +++ b/t/run/switchF.t @@ -1,11 +1,16 @@ #!./perl -anFx+ BEGIN { - print "1..2\n"; + chdir 't' if -d 't'; + @INC = '../lib'; + require './test.pl'; *ARGV = *DATA; + plan(tests => 2); } -print "@F"; +my $index = $F[-1]; +chomp $index; +is($index, $., "line $."); __DATA__ okx1 -okxxx2 +okx3xx2 diff --git a/t/run/switchn.t b/t/run/switchn.t index bca9a66..6ad4a72 100644 --- a/t/run/switchn.t +++ b/t/run/switchn.t @@ -1,15 +1,19 @@ #!./perl -n BEGIN { - print "1..3\n"; + chdir 't' if -d 't'; + @INC = '../lib'; + require './test.pl'; *ARGV = *DATA; + plan(tests => 3); } END { - print "ok 3\n"; + pass("Final test"); } -print; +chomp; +is("ok ".$., $_, "Checking line $."); s/^/not /; -- Perl5 Master Repository
