summaryrefslogtreecommitdiff
path: root/win32/TEST
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1997-01-29 18:11:00 +1200
committerChip Salzenberg <chip@atlantic.net>1997-01-29 18:11:00 +1200
commit0a753a764065f2260004b6e6975085378b850346 (patch)
treee5163ab53209cc4bf655cabaf4067f18036a9106 /win32/TEST
parent4b094ceb80288fc9f7c15ae78fc662051510284d (diff)
downloadperl-0a753a764065f2260004b6e6975085378b850346.tar.gz
[inseparable changes from patch from perl5.003_23 to perl5.003_24]perl-5.003_24
CORE LANGUAGE CHANGES Subject: glob defaults to $_ Date: Mon, 27 Jan 1997 03:09:13 -0500 From: Gurusamy Sarathy <gsar@engin.umich.edu> Files: op.c opcode.pl pod/perlfunc.pod t/op/glob.t private-msgid: <199701270809.DAA00934@aatma.engin.umich.edu> Subject: Re: an overloading bug Date: Sun, 26 Jan 1997 19:07:45 -0500 From: Gurusamy Sarathy <gsar@engin.umich.edu> Files: pod/perldiag.pod pod/perlfunc.pod pp_ctl.c private-msgid: <199701270007.TAA26525@aatma.engin.umich.edu> CORE PORTABILITY Subject: Win32 port From: Gary Ng <71564.1743@compuserve.com> Files: MANIFEST win32/* Subject: Amiga files Date: Sun, 26 Jan 1997 17:42:15 +0100 From: Norbert Pueschel <pueschel@imsdd.meb.uni-bonn.de> Files: MANIFEST README.amiga hints/amigaos.sh private-msgid: <77724712@Armageddon.meb.uni-bonn.de> DOCUMENTATION Subject: perldelta Fcntl enhancement Date: Sat, 25 Jan 1997 17:05:34 +0200 (EET) From: Jarkko Hietaniemi <jhi@cc.hut.fi> Files: pod/perldelta.pod private-msgid: <199701251505.RAA22159@alpha.hut.fi> Subject: Updates to perldelta re: Fcntl, DB_File, Net::Ping From: Paul Marquess <pmarquess@bfsec.bt.co.uk> Files: pod/perldelta.pod Subject: Document restrictions on gv_fetchmethod() and perl_call_sv() From: Chip Salzenberg <chip@atlantic.net> Files: pod/perldelta.pod pod/perlguts.pod Subject: perldiag.pod: No comma allowed after %s Date: Sat, 25 Jan 1997 17:41:53 +0200 (EET) From: Jarkko Hietaniemi <Jarkko.Hietaniemi@cc.hut.fi> Files: pod/perldiag.pod private-msgid: <199701251541.RAA04120@alpha.hut.fi> Subject: perlfunc.pod: localtime Date: Sat, 25 Jan 1997 18:29:37 +0200 (EET) From: Jarkko Hietaniemi <jhi@cc.hut.fi> Files: pod/perlfunc.pod private-msgid: <199701251629.SAA08114@alpha.hut.fi> Subject: perlfunc diff: gmtime Date: Tue, 28 Jan 1997 14:52:08 +0000 From: Peter Haworth <pmh@edison.ioppublishing.com> Files: pod/perlfunc.pod private-msgid: <32EE1298.7B90@edison.ioppublishing.com> Subject: Updates to guts Date: Sun, 26 Jan 1997 19:34:18 -0500 (EST) From: Ilya Zakharevich <ilya@math.ohio-state.edu> Files: pod/perlguts.pod private-msgid: <199701270034.TAA13177@monk.mps.ohio-state.edu> TESTS Subject: New test op/closure.t From: Tom Phoenix <rootbeer@teleport.com> Files: MANIFEST t/op/closure.t
Diffstat (limited to 'win32/TEST')
-rw-r--r--win32/TEST145
1 files changed, 145 insertions, 0 deletions
diff --git a/win32/TEST b/win32/TEST
new file mode 100644
index 0000000000..bd9f7b7186
--- /dev/null
+++ b/win32/TEST
@@ -0,0 +1,145 @@
+#!./perl
+
+# Last change: Fri Jan 10 09:57:03 WET 1997
+
+# This is written in a peculiar style, since we're trying to avoid
+# most of the constructs we'll be testing for.
+
+$| = 1;
+
+if ($ARGV[0] eq '-v') {
+ $verbose = 1;
+ shift;
+}
+
+chdir 't' if -f 't/TEST';
+
+die "You need to run \"make test\" first to set things up.\n"
+ unless -e 'perl' or -e 'perl.exe';
+
+$ENV{EMXSHELL} = 'sh'; # For OS/2
+
+if ($ARGV[0] eq '') {
+ push( @ARGV, `dir/s/b base` );
+ push( @ARGV, `dir/s/b comp` );
+ push( @ARGV, `dir/s/b cmd` );
+ push( @ARGV, `dir/s/b io` );
+ push( @ARGV, `dir/s/b op` );
+ push( @ARGV, `dir/s/b lib` );
+ push( @ARGV, `dir/s/b nt` );
+
+ grep( chomp, @ARGV );
+ @ARGV = grep( /\.t$/, @ARGV );
+ grep( s/.*t\\//, @ARGV );
+# @ARGV = split(/[ \n]/,
+# `echo base/*.t comp/*.t cmd/*.t io/*.t; echo op/*.t pragma/*.t lib/*.t`);
+}
+
+if ($^O eq 'os2' || $^O eq 'qnx' || 1) {
+ $sharpbang = 0;
+}
+else {
+ open(CONFIG, "../config.sh");
+ while (<CONFIG>) {
+ if (/sharpbang='(.*)'/) {
+ $sharpbang = ($1 eq '#!');
+ last;
+ }
+ }
+ close(CONFIG);
+}
+
+$bad = 0;
+$good = 0;
+$total = @ARGV;
+while ($test = shift) {
+ if ($test =~ /^$/) {
+ next;
+ }
+ $te = $test;
+ chop($te);
+ print "$te" . '.' x (18 - length($te));
+ if ($sharpbang) {
+ open(results,"./$test |") || (print "can't run.\n");
+ } else {
+ open(script,"$test") || die "Can't run $test.\n";
+ $_ = <script>;
+ close(script);
+ if (/#!..perl(.*)/) {
+ $switch = $1;
+ if ($^O eq 'VMS') {
+ # Must protect uppercase switches with "" on command line
+ $switch =~ s/-([A-Z]\S*)/"-$1"/g;
+ }
+ } else {
+ $switch = '';
+ }
+ open(results,"perl$switch $test |") || (print "can't run.\n");
+ }
+ $ok = 0;
+ $next = 0;
+ while (<results>) {
+ if (/^$/) { next;};
+ if ($verbose) {
+ print $_;
+ }
+ unless (/^#/) {
+ if (/^1\.\.([0-9]+)/) {
+ $max = $1;
+ $totmax += $max;
+ $files += 1;
+ $next = 1;
+ $ok = 1;
+ } else {
+ $next = $1, $ok = 0, last if /^not ok ([0-9]*)/;
+ if (/^ok (.*)/ && $1 == $next) {
+ $next = $next + 1;
+ } else {
+ $ok = 0;
+ }
+ }
+ }
+ }
+ $next = $next - 1;
+ if ($ok && $next == $max) {
+ if ($max) {
+ print "ok\n";
+ $good = $good + 1;
+ } else {
+ print "skipping test on this platform\n";
+ $files -= 1;
+ }
+ } else {
+ $next += 1;
+ print "FAILED on test $next\n";
+ $bad = $bad + 1;
+ $_ = $test;
+ if (/^base/) {
+ die "Failed a basic test--cannot continue.\n";
+ }
+ }
+}
+
+if ($bad == 0) {
+ if ($ok) {
+ print "All tests successful.\n";
+ } else {
+ die "FAILED--no tests were run for some reason.\n";
+ }
+} else {
+ $pct = sprintf("%.2f", $good / $total * 100);
+ if ($bad == 1) {
+ warn "Failed 1 test script out of $total, $pct% okay.\n";
+ } else {
+ warn "Failed $bad test scripts out of $total, $pct% okay.\n";
+ }
+ warn <<'SHRDLU';
+ ### Since not all tests were successful, you may want to run some
+ ### of them individually and examine any diagnostic messages they
+ ### produce. See the INSTALL document's section on "make test".
+SHRDLU
+}
+($user,$sys,$cuser,$csys) = times;
+print sprintf("u=%g s=%g cu=%g cs=%g scripts=%d tests=%d\n",
+ $user,$sys,$cuser,$csys,$files,$totmax);
+exit $bad != 0;