Refactor t/run/switchF.t to use test.pl instead of making TAP by hand.
authorColin Kuskie <colink@perldreamer.com>
Sat, 15 Sep 2012 07:45:44 +0000 (00:45 -0700)
committerjkeenan <jkeenan@cpan.org>
Sun, 16 Sep 2012 16:48:43 +0000 (12:48 -0400)
t/run/switchF.t

index a6e9031..dcf4409 100644 (file)
@@ -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