Change 11398 by nick@camel-linux on 2001/07/17 08:26:35

        Subject: Re: [PATCH: perl@11359] possible fix for sprintf.t on VAX that loads 
%Config
        From: Peter Prymmer <[EMAIL PROTECTED]>
        Date: Mon, 16 Jul 2001 16:43:14 -0700 (PDT)
        Message-Id: <[EMAIL PROTECTED]>
        
        Move t/base/commonsense.t to t/lib/commonsense.t - base tests
        should not depend on existance of Config.pm

Affected files ...

... //depot/perl/MANIFEST#505 edit
... //depot/perl/t/README#9 edit
... //depot/perl/t/base/commonsense.t#3 delete
... //depot/perl/t/lib/commonsense.t#1 branch

Differences ...

==== //depot/perl/MANIFEST#505 (text) ====
Index: perl/MANIFEST
--- perl/MANIFEST.~1~   Tue Jul 17 02:30:05 2001
+++ perl/MANIFEST       Tue Jul 17 02:30:05 2001
@@ -1845,7 +1845,6 @@
 scope.h                                Scope entry and exit header
 sv.c                           Scalar value code
 sv.h                           Scalar value header
-t/base/commonsense.t           See if configuration meets basic needs
 t/base/cond.t                  See if conditionals work
 t/base/if.t                    See if if works
 t/base/lex.t                   See if lexical items work
@@ -1888,6 +1887,7 @@
 t/io/tell.t                    See if file seeking works
 t/io/utf8.t                    See if file seeking works
 t/lib/1_compile.t              See if the various libraries and extensions compile
+t/lib/commonsense.t            See if configuration meets basic needs
 t/lib/compmod.pl               Helper for 1_compile.t
 t/lib/dprof/test1_t            Perl code profiler tests
 t/lib/dprof/test1_v            Perl code profiler tests

==== //depot/perl/t/README#9 (text) ====
Index: perl/t/README
--- perl/t/README.~1~   Tue Jul 17 02:30:05 2001
+++ perl/t/README       Tue Jul 17 02:30:05 2001
@@ -1,4 +1,6 @@
-This is the perl test library.  To run all the tests, just type './TEST'.
+This is the perl test library.  To run most of the tests, just type './TEST'
+(which will not run the tests residing in lib/ or ext/.  In order to run
+all of the tests type 'make test' from the build direcotory above t/).
 
 To add new tests, just look at the current tests and do likewise.
 
@@ -10,12 +12,17 @@
 
 If you know that Perl is basically working but expect that some tests
 will fail, you may want to use Test::Harness thusly:
+        cd t
        ./perl -I../lib harness
 This method pinpoints failed tests automatically.
 
 If you come up with new tests, please send them to [EMAIL PROTECTED]
 
-Tests in the base/ directory ought to be runnable with plain miniperl.
+Tests in the t/base/ directory ought to be runnable with plain miniperl.
 That is, they should not require Config.pm nor should they require any
 extensions to have been built.  TEST will abort if any tests in the
-base/ directory fail.
+t/base/ directory fail.
+
+Tests in the t/comp/, t/cmd/, t/run/, t/io/, and t/op/ directories should
+also be runnable by miniperl and not require Config.pm, but failures
+to comply will not cause TEST to abort like for t/base/.

==== //depot/perl/t/lib/commonsense.t#1 (text) ====
Index: perl/t/lib/commonsense.t
--- perl/t/lib/commonsense.t.~1~        Tue Jul 17 02:30:05 2001
+++ perl/t/lib/commonsense.t    Tue Jul 17 02:30:05 2001
@@ -0,0 +1,25 @@
+#!./perl
+
+chdir 't' if -d 't';
+@INC = '../lib';
+require Config; import Config;
+if (($Config{'extensions'} !~ /\b(DB|[A-Z]DBM)_File\b/) ){
+  print "Bail out! Perl configured without DB_File or [A-Z]DBM_File\n";
+  exit 0;
+}
+if (($Config{'extensions'} !~ /\bFcntl\b/) ){
+  print "Bail out! Perl configured without Fcntl module\n";
+  exit 0;
+}
+if (($Config{'extensions'} !~ /\bIO\b/) ){
+  print "Bail out! Perl configured without IO module\n";
+  exit 0;
+}
+# hey, DOS users do not need this kind of common sense ;-)
+if ($^O ne 'dos' && ($Config{'extensions'} !~ /\bFile\/Glob\b/) ){
+  print "Bail out! Perl configured without File::Glob module\n";
+  exit 0;
+}
+
+print "1..1\nok 1\n";
+
End of Patch.

Reply via email to