This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Convert all File::Glob tests to Test::More.
[perl5.git] / ext / File-Glob / t / taint.t
index fe2fa23..3f49836 100644 (file)
@@ -8,19 +8,14 @@ BEGIN {
         print "1..0\n";
         exit 0;
     }
-    print "1..2\n";
 }
-END {
-    print "not ok 1\n" unless $loaded;
+
+use Test::More tests => 2;
+
+BEGIN {
+    use_ok('File::Glob');
 }
-use File::Glob;
-$loaded = 1;
-print "ok 1\n";
 
-# all filenames should be tainted
 @a = File::Glob::bsd_glob("*");
 eval { $a = join("",@a), kill 0; 1 };
-unless ($@ =~ /Insecure dependency/) {
-    print "not ";
-}
-print "ok 2\n";
+like($@, qr/Insecure dependency/, 'all filenames should be tainted');