summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2001-05-20 16:48:29 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2001-05-20 16:48:29 +0000
commit94fa653cf3a9954f2dc6ff832a54fa0a30c4c094 (patch)
tree6e727e74af2bf40e0d0cd13f9ea2b13ada309cec /t
parent68bd741440800c6281f02247ca3e0bbc0ed1a0ea (diff)
parent3f7d42d86a70d697ec5a8fca00c89984282b399e (diff)
downloadperl-94fa653cf3a9954f2dc6ff832a54fa0a30c4c094.tar.gz
Integrate mainline
p4raw-id: //depot/perlio@10170
Diffstat (limited to 't')
-rw-r--r--t/lib/b-stash.t6
-rwxr-xr-xt/lib/bigfltpm.t2
-rw-r--r--t/lib/peek.t4
-rwxr-xr-xt/op/chop.t12
4 files changed, 18 insertions, 6 deletions
diff --git a/t/lib/b-stash.t b/t/lib/b-stash.t
index 3d12de3dfe..947a2ad98d 100644
--- a/t/lib/b-stash.t
+++ b/t/lib/b-stash.t
@@ -39,8 +39,10 @@ if ($Is_VMS) {
$a =~ s/-uVMS,-uVMS::Filespec,//;
$a =~ s/-uSocket,//; # Socket is optional/compiler version dependent
}
-if ($Config{static_ext} eq ' ' ||
- ($Config{static_ext} eq 'Socket' && $Is_VMS)) {
+if (($Config{static_ext} eq ' ' ||
+ ($Config{static_ext} eq 'Socket' && $Is_VMS))
+ && !($^O eq 'os2' and $OS2::is_aout)
+ ) {
if (ord('A') == 193) { # EBCDIC sort order is qw(a A) not qw(A a)
$b = join ',', sort split /,/, $b;
}
diff --git a/t/lib/bigfltpm.t b/t/lib/bigfltpm.t
index 18bab4fd4c..8247e422e7 100755
--- a/t/lib/bigfltpm.t
+++ b/t/lib/bigfltpm.t
@@ -282,7 +282,7 @@ $Math::BigFloat::rnd_mode = 'even'
-6.35:-1:/-6.(?:4|39{5}\d+|29{8}\d+)
-0.0065:-1:0
-0.0065:-2:/-0\.01|-1e-02
--0.0065:-3:/-0\.006|-7e-03
+-0.0065:-3:/-0\.006|-7e-03|-6e-03
-0.0065:-4:/-0\.006(?:5|49{5}\d+)|-6\.5e-03
-0.0065:-5:/-0\.006(?:5|49{5}\d+)|-6\.5e-03
&fcmp
diff --git a/t/lib/peek.t b/t/lib/peek.t
index 96e24a2e4f..c14dc9bdad 100644
--- a/t/lib/peek.t
+++ b/t/lib/peek.t
@@ -251,7 +251,7 @@ do_test(15,
PV = 0
MAGIC = $ADDR
MG_VIRTUAL = $ADDR
- MG_TYPE = \'r\'
+ MG_TYPE = PERL_MAGIC_qr\(r\)
MG_OBJ = $ADDR
STASH = $ADDR\\t"Regexp"');
@@ -283,7 +283,7 @@ do_test(17,
NV = 0
MAGIC = $ADDR
MG_VIRTUAL = &PL_vtbl_glob
- MG_TYPE = \'\\*\'
+ MG_TYPE = PERL_MAGIC_glob\(\*\)
MG_OBJ = $ADDR
NAME = "a"
NAMELEN = 1
diff --git a/t/op/chop.t b/t/op/chop.t
index 1b55f11832..e8b777eb6a 100755
--- a/t/op/chop.t
+++ b/t/op/chop.t
@@ -1,6 +1,6 @@
#!./perl
-print "1..37\n";
+print "1..41\n";
# optimized
@@ -116,3 +116,13 @@ print chop(@stuff[0, 2]) eq 'f' ? "ok 36\n" : "not ok 36\n";
my %stuff = (1..4);
print chop(@stuff{1, 3}) eq '4' ? "ok 37\n" : "not ok 37\n";
+
+# chomp should not stringify references unless it decides to modify them
+$_ = [];
+$/ = "\n";
+print chomp() == 0 ? "ok 38\n" : "not ok 38\n";
+print ref($_) eq "ARRAY" ? "ok 39\n" : "not ok 39\n";
+
+$/ = ")"; # the last char of something like "ARRAY(0x80ff6e4)"
+print chomp() == 1 ? "ok 40\n" : "not ok 40\n";
+print !ref($_) ? "ok 41\n" : "not ok 41\n";