From: Gurusamy Sarathy Date: Sun, 23 Jan 2000 09:36:51 +0000 (+0000) Subject: new test (from Michael G Schwern ) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f5ad548981fabdd729c642abf0b7d298bf62131b;p=p5sagit%2Fp5-mst-13.2.git new test (from Michael G Schwern ) p4raw-id: //depot/perl@4855 --- diff --git a/MANIFEST b/MANIFEST index 0e6282f..34d581a 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1416,6 +1416,7 @@ t/pod/testcmp.pl Module to compare output against expected results t/pod/testp2pt.pl Module to test Pod::PlainText for a given file t/pod/testpchk.pl Module to test Pod::Checker for a given file t/pragma/constant.t See if compile-time constants work +t/pragma/diagnostics.t See if diagnostics.pm works t/pragma/locale.t See if locale support works t/pragma/locale/latin1 Part of locale.t in Latin 1 t/pragma/locale/utf8 Part of locale.t in UTF8 diff --git a/t/pragma/diagnostics.t b/t/pragma/diagnostics.t new file mode 100755 index 0000000..8c9a152 --- /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 }