Add the original source packages to maemo, source lenny
[dh-make-perl] / dev / i386 / libtest-simple-perl / libtest-simple-perl-0.80 / t / BEGIN_use_ok.t
diff --git a/dev/i386/libtest-simple-perl/libtest-simple-perl-0.80/t/BEGIN_use_ok.t b/dev/i386/libtest-simple-perl/libtest-simple-perl-0.80/t/BEGIN_use_ok.t
new file mode 100644 (file)
index 0000000..26caaa1
--- /dev/null
@@ -0,0 +1,28 @@
+#!/usr/bin/perl -w
+
+# [rt.cpan.org 28345]
+#
+# A use_ok() inside a BEGIN block lacking a plan would be silently ignored.
+
+BEGIN {
+    if( $ENV{PERL_CORE} ) {
+        chdir 't';
+        @INC = ('../lib', 'lib');
+    }
+    else {
+        unshift @INC, 't/lib';
+    }
+}
+
+use Test::More;
+
+my $result;
+BEGIN {
+    eval {
+        use_ok("Wibble");
+    };
+    $result = $@;
+}
+
+plan tests => 1;
+like $result, '/^You tried to run a test without a plan/';