diff options
author | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1990-11-09 13:39:17 +0000 |
---|---|---|
committer | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1990-11-09 13:39:17 +0000 |
commit | 5303340c1eb77f5b18e12347ed4a7fa2eb6cd9f7 (patch) | |
tree | be6a2e2430c813552b7d1453cc690167c68a66b4 /t | |
parent | e5d73d7778736a8bd9f7f44aad5289ad2c783a16 (diff) | |
download | perl-5303340c1eb77f5b18e12347ed4a7fa2eb6cd9f7.tar.gz |
perl 3.0 patch #38 (combined patch)
Forget the description, it's too late at night...
Diffstat (limited to 't')
-rw-r--r-- | t/TEST | 8 | ||||
-rw-r--r-- | t/comp.cpp | 30 |
2 files changed, 21 insertions, 17 deletions
@@ -1,6 +1,6 @@ #!./perl -# $Header: TEST,v 3.0.1.1 89/11/11 04:58:01 lwall Locked $ +# $Header: TEST,v 3.0.1.2 90/11/10 02:09:07 lwall Locked $ # This is written in a peculiar style, since we're trying to avoid # most of the constructs we'll be testing for. @@ -15,11 +15,11 @@ if ($ARGV[0] eq '-v') { chdir 't' if -f 't/TEST'; if ($ARGV[0] eq '') { - @ARGV = split(/[ \n]/,`echo base.* comp.* cmd.* io.* op.*`); + @ARGV = split(/[ \n]/,`echo base.* comp.* cmd.* io.* op.* lib.*`); } -open(config,"../config.sh"); -while (<config>) { +open(CONFIG,"../config.sh"); +while (<CONFIG>) { if (/sharpbang='(.*)'/) { $sharpbang = ($1 eq '#!'); last; diff --git a/t/comp.cpp b/t/comp.cpp index 0464108d9e..9e8b1d3378 100644 --- a/t/comp.cpp +++ b/t/comp.cpp @@ -1,6 +1,6 @@ #!./perl -P -# $Header: comp.cpp,v 3.0.1.1 90/08/09 05:25:34 lwall Locked $ +# $Header: comp.cpp,v 3.0.1.2 90/11/10 02:10:17 lwall Locked $ print "1..3\n"; @@ -15,21 +15,25 @@ print MESS; print "not ok 2\n"; #endif -open(try,">Comp.cpp.tmp") || die "Can't open temp perl file."; -print try '$ok = "not ok 3\n";'; print try "\n"; -print try "#include <Comp.cpp.inc>\n"; -print try "#ifdef OK\n"; -print try '$ok = OK;'; print try "\n"; -print try "#endif\n"; -print try 'print $ok;'; print try "\n"; -close try; +open(TRY,">Comp.cpp.tmp") || die "Can't open temp perl file."; -open(try,">Comp.cpp.inc") || (die "Can't open temp include file."); -print try '#define OK "ok 3\n"'; print try "\n"; -close try; +($prog = <<'END') =~ s/X//g; +X$ok = "not ok 3\n"; +X#include "Comp.cpp.inc" +X#ifdef OK +X$ok = OK; +X#endif +Xprint $ok; +END +print TRY $prog; +close TRY; + +open(TRY,">Comp.cpp.inc") || (die "Can't open temp include file."); +print TRY '#define OK "ok 3\n"' . "\n"; +close TRY; $pwd=`pwd`; $pwd =~ s/\n//; -$x = `./perl -P -I$pwd Comp.cpp.tmp`; +$x = `./perl -P Comp.cpp.tmp`; print $x; unlink "Comp.cpp.tmp", "Comp.cpp.inc"; |