summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-01-23 09:36:51 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-01-23 09:36:51 +0000
commitf5ad548981fabdd729c642abf0b7d298bf62131b (patch)
tree11323f92a95eba5dcf6c3467dbded0b3b72a3473 /t
parent8bc03d0d6d6040fd681d4592ecfb6fe75ed53524 (diff)
downloadperl-f5ad548981fabdd729c642abf0b7d298bf62131b.tar.gz
new test (from Michael G Schwern <schwern@pobox.com>)
p4raw-id: //depot/perl@4855
Diffstat (limited to 't')
-rwxr-xr-xt/pragma/diagnostics.t37
1 files changed, 37 insertions, 0 deletions
diff --git a/t/pragma/diagnostics.t b/t/pragma/diagnostics.t
new file mode 100755
index 0000000000..8c9a152a18
--- /dev/null
+++ b/t/pragma/diagnostics.t
@@ -0,0 +1,37 @@
+#!./perl
+
+BEGIN {
+ chdir '..' if -d '../pod';
+ unshift @INC, './lib' if -d './lib';
+}
+
+
+######################### We start with some black magic to print on failure.
+
+# Change 1..1 below to 1..last_test_to_print .
+# (It may become useful if the test is moved to ./t subdirectory.)
+use strict;
+
+use vars qw($Test_Num $Total_tests);
+
+my $loaded;
+BEGIN { $| = 1; $^W = 1; $Test_Num = 1 }
+END {print "not ok $Test_Num\n" unless $loaded;}
+print "1..$Total_tests\n";
+BEGIN { require diagnostics; } # Don't want diagnostics' noise yet.
+$loaded = 1;
+ok($loaded, 'compile');
+######################### End of black magic.
+
+sub ok {
+ my($test, $name) = shift;
+ print "not " unless $test;
+ print "ok $Test_Num";
+ print " - $name" if defined $name;
+ print "\n";
+ $Test_Num++;
+}
+
+
+# Change this to your # of ok() calls + 1
+BEGIN { $Total_tests = 1 }