On Sat, Nov 03, 2001 at 12:46:50AM -0500, Charles Lane wrote: > I find that Perl@12814 has a test failure for lib/file/temp/t/mktemp.t > on VMS. The problem is coming from a failure to parse the #! line > in vms/test.com and get the -T switch set properly when running the > test. It looks like many tests in the lib/... tree have this problem, > but a command line with missing -w switches doesn't generate complaints > like one missing a -T, so there is only one overt failure. > > Now, I could easily change vms/test.com, but thought this really should > be run past some "test experts"... > > Should various lib/(etc,etc)/*.t files be using #!/usr/bin/perl ? > The "regular" (old-time) test suite tends to have #!./perl so that > the perl that was just built is the one that gets run.
Technically speaking, the core tests should say #!./perl. Practically speaking it doesn't matter. Pragmatically speaking, lib/ tests probably shouldn't say #!./perl. First, the perl mentioned on the #! line is ignored by the testing harness (or should be). However, the switches are not. So if you say #!/usr/bin/perl -Tw, ./perl -Tw will be run. With lib/ tests, these are often taken straight from CPAN modules. They're not going to say #!./perl in the module test, and since the core tests ignore that bit it can be left as is. One less thing to change when syncing up the core with a CPAN module. This patch makes test.com's switch finding logic mirror t/TEST. I'm also going to mumble something about merging t/TEST and vms/test.com again. They're essentially the same except for that DCL and assembly insanity. IIRC it's a little bit of unixification plus a roll your own echo? Could somebody explain how the DCL bits and the Perl bits go about getting executed? Does it have to start with /^$/ or can the DCL parts be a line or two lower down, like say in a here-doc or POD? Hmm, what about this? $! = <<VMS_DCL_DRIVER $! $! Test.Com - DCL driver for perl5 regression tests $ blah blah $ VMS_DCL_DRIVER undef $!; ...t/TEST goes here... So VMS will see the DCL stuff, and Unix will just see it as a here-doc. --- vms/test.com 2001/11/03 20:24:12 1.1 +++ vms/test.com 2001/11/03 20:24:35 @@ -176,7 +176,7 @@ open(script,"$test") || die "Can't run $test.\n"; $_ = <script>; close(script); - if (/#!..perl(.*)/) { + if (/#!.*perl(.*)$/) { $switch = $1; # Add "" to protect uppercase switches on command line $switch =~ s/-(\S*[A-Z]\S*)/"-$1"/g; -- Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/ Perl6 Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One Here's hoping you don't become a robot!