summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorAndy Dougherty <doughera@lafcol.lafayette.edu>1995-10-31 03:33:09 +0000
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1995-10-31 03:33:09 +0000
commit8e07c86ebc651fe92eb7e3b25f801f57cfb8dd6f (patch)
treebd67a65038befe4bef8b330a688bf7d915cab92f /t
parente50aee73b3d4c555c37e4b4a16694765fb16c887 (diff)
downloadperl-8e07c86ebc651fe92eb7e3b25f801f57cfb8dd6f.tar.gz
This is my patch patch.1n for perl5.001.perl-5.001n
To apply, change to your perl directory, run the command above, then apply with patch -p1 -N < thispatch. This is a consolidation patch. It contains many of the most commonly applied or agreed-to patches that have been circulating since patch.1m. It also changes the 'unofficial patchlevel' in perl.c. There are some problems (see items marked with '***'). I will attempt to address those in a patch.1o in a few days. This patch contains the following packages: My Jumbo Configure patch vs. 1m, with subsequent patches 1, 2, and 3. Mainly, this provides easier use of local libraries, documents the installation process in a new INSTALL file, moves important questions towards the beginning, and improves detection of signal names (mostly for Linux). xsubpp-1.922. Patches from Larry: eval "1" memory leak patch (as modified by GSAR to apply to 5.001m). NETaa14551 Infinite loop in formats, NETaa13729 scope.c patch (fixed problems on AIX and others) NETaa14138 "substr() & s///" (pp_hot.c) Patches from ftp.perl.com: ftp://ftp.perl.com/pub/perl/src/patches/closure-bug.patch, version of 20 Sep 1995 Includes fix for NETaa14347 (32k limit in regex), and other fixes. ftp://ftp.perl.com/pub/perl/src/patches/debugger.patch, version of 27 Aug 1995 ftp://ftp.perl.com/pub/perl/src/patches/glob-undef.patch, version of 4 Sep 1995 NETaa14421 $_ doesn't undef ftp://ftp.perl.com/pub/perl/src/patches/op-segfault.patch, version of 21 Aug 1995 ftp://ftp.perl.com/pub/perl/src/patches/warn-ref-hash-key.patch, version of 5 Jun 1995 Tim Bunce's Jumbo DynaLoader patch for Perl5.001m, which is NETaa14636 Jumbo DynaLoader patch for Perl5.001m, and Additional patch for NETaa14636 Jumbo DynaLoader patch for Perl5.001m version of 09 Oct 1995. ***This needs some additional parentheses.*** MakeMaker-5.00. Supercedes NETaa13540 (VMS MakeMaker patches). (Updates minimod.PL as well.) ***This has a couple of minor problems. pod2man is run even if it isn't available. LD_RUN_PATH gets set to some mysterious values.*** NETaa14657 Paul Marquess Net::Ping patch. I've included Net-Ping-1.00. NETaa14661 Dean Roehrich DProf. Installed as ext/Devel/DProf. Configure should pick this up automatically. (5 Apr 1995 version.) NETaa13742 Jack Shirazi Socket in 5.001. I've also included his socket.t test in t/lib/socket.t. c2ph-1.7. Dean's perlapi patches of Oct 12, 1995, which superceded those of Oct 8, 1995. This is the one that did mv perlapi.pid perlxs.pod. NETaa14310 Tim Bunce A trivial patch for configpm (handy for shell scripts) DB_File-1.0 patch from Paul Marquess (pmarquess@bfsec.bt.co.uk) last modified 7th October 1995 version 1.0 Added or updated the following hints files: hints/hpux.sh hints/ncr_tower.sh hints/netbsd.sh hints/ultrix.sh Patch and enjoy. Andy Dougherty doughera@lafcol.lafayette.edu Dept. of Physics Lafayette College, Easton PA 18042
Diffstat (limited to 't')
-rw-r--r--t/README5
-rwxr-xr-xt/lib/db-btree.t55
-rw-r--r--t/lib/socket.t62
3 files changed, 116 insertions, 6 deletions
diff --git a/t/README b/t/README
index e2cb308379..47ab845193 100644
--- a/t/README
+++ b/t/README
@@ -8,9 +8,4 @@ If you put out extra lines with a '#' character on the front, you don't
have to worry about removing the extra print statements later since TEST
ignores lines beginning with '#'.
-Several tests assume you have sucessfully included the POSIX
-extension. If you have not, lib/[nos]dbm.t will fail. Try replacing
-the O_CREAT|O_RDWR with either 0x202 or 0x102 in the tie statements
-and run the tests again.
-
If you come up with new tests, send them to lwall@netlabs.com.
diff --git a/t/lib/db-btree.t b/t/lib/db-btree.t
index 308b8f489a..d90de6cd59 100755
--- a/t/lib/db-btree.t
+++ b/t/lib/db-btree.t
@@ -12,7 +12,7 @@ BEGIN {
use DB_File;
use Fcntl;
-print "1..73\n";
+print "1..76\n";
$Dfile = "Op.db-btree";
unlink $Dfile;
@@ -348,4 +348,57 @@ print ($status == -1 ? "ok 73\n" : "not ok 73\n") ;
undef $Y ;
untie %h ;
+# test multiple callbacks
+$Dfile1 = "btree1" ;
+$Dfile2 = "btree2" ;
+$Dfile3 = "btree3" ;
+
+$dbh1 = TIEHASH DB_File::BTREEINFO ;
+$dbh1->{compare} = sub { $_[0] <=> $_[1] } ;
+
+$dbh2 = TIEHASH DB_File::BTREEINFO ;
+$dbh2->{compare} = sub { $_[0] cmp $_[1] } ;
+
+$dbh3 = TIEHASH DB_File::BTREEINFO ;
+$dbh3->{compare} = sub { length $_[0] <=> length $_[1] } ;
+
+
+tie(%h, DB_File,$Dfile1, O_RDWR|O_CREAT, 0640, $dbh1 ) ;
+tie(%g, DB_File,$Dfile2, O_RDWR|O_CREAT, 0640, $dbh2 ) ;
+tie(%k, DB_File,$Dfile3, O_RDWR|O_CREAT, 0640, $dbh3 ) ;
+
+@Keys = qw( 0123 12 -1234 9 987654321 def ) ;
+@srt_1 = sort { $a <=> $b } @Keys ;
+@srt_2 = sort { $a cmp $b } @Keys ;
+@srt_3 = sort { length $a <=> length $b } @Keys ;
+
+foreach (@Keys) {
+ $h{$_} = 1 ;
+ $g{$_} = 1 ;
+ $k{$_} = 1 ;
+}
+
+sub ArrayCompare
+{
+ my($a, $b) = @_ ;
+
+ return 0 if @$a != @$b ;
+
+ foreach (1 .. length @$a)
+ {
+ return 0 unless $$a[$_] eq $$b[$_] ;
+ }
+
+ 1 ;
+}
+
+print ( ArrayCompare (\@srt_1, [keys %h]) ? "ok 74\n" : "not ok 74\n") ;
+print ( ArrayCompare (\@srt_2, [keys %g]) ? "ok 75\n" : "not ok 75\n") ;
+print ( ArrayCompare (\@srt_3, [keys %k]) ? "ok 76\n" : "not ok 76\n") ;
+
+untie %h ;
+untie %g ;
+untie %k ;
+unlink $Dfile1, $Dfile2, $Dfile3 ;
+
exit ;
diff --git a/t/lib/socket.t b/t/lib/socket.t
new file mode 100644
index 0000000000..2b9b820144
--- /dev/null
+++ b/t/lib/socket.t
@@ -0,0 +1,62 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ require Config; import Config;
+ if ($Config{'extensions'} !~ /\bSocket\b/ && $Config{'osname'} ne 'VMS') {
+ print STDERR "1..0\n";
+ exit 0;
+ }
+}
+
+use Socket;
+
+print "1..6\n";
+
+if( socket(T,PF_INET,SOCK_STREAM,6) ){
+ print "ok 1\n";
+
+ if( connect(T,pack_sockaddr_in(AF_INET,7,inet_aton("localhost")))){
+ print "ok 2\n";
+
+ print "# Connected to ",
+ inet_ntoa((unpack_sockaddr_in(getpeername(T)))[2]),"\n";
+
+ syswrite(T,"hello",5);
+ sysread(T,$buff,10);
+ print $buff eq "hello" ? "ok 3\n" : "not ok 3\n";
+ }
+ else{
+ print "# $!\n";
+ print "not ok 2\n";
+ }
+}
+else{
+ print "# $!\n";
+ print "not ok 1\n";
+}
+
+if( socket(S,PF_INET,SOCK_STREAM,6) ){
+ print "ok 4\n";
+
+ if( connect(S,pack_sockaddr_in(AF_INET,7,INADDR_LOOPBACK))){
+ print "ok 5\n";
+
+ print "# Connected to ",
+ inet_ntoa((unpack_sockaddr_in(getpeername(S)))[2]),"\n";
+
+ syswrite(S,"olleh",5);
+ sysread(S,$buff,10);
+ print $buff eq "olleh" ? "ok 6\n" : "not ok 6\n";
+ }
+ else{
+ print "# $!\n";
+ print "not ok 5\n";
+ }
+}
+else{
+ print "# $!\n";
+ print "not ok 4\n";
+}
+