Refactor t/run/switcha.t to use test.pl instead of making TAP by hand.
authorColin Kuskie <colink@perldreamer.com>
Sat, 15 Sep 2012 07:53:57 +0000 (00:53 -0700)
committerJames E Keenan <jkeenan@cpan.org>
Fri, 21 Sep 2012 00:54:50 +0000 (20:54 -0400)
t/run/switcha.t

index ec2f0cc..16c7917 100644 (file)
@@ -1,11 +1,14 @@
 #!./perl -na
 
 BEGIN {
-    print "1..2\n";
+    chdir 't' if -d 't';
+    @INC = '../lib';
+    require './test.pl';
     *ARGV = *DATA;
-    $i = 0;
+    plan(tests => 2);
 }
-print "$F[1] ",++$i,"\n";
+chomp;
+is($F[1], 'ok', "testing split of string '$_'");
 
 __DATA__
 not ok