summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2002-06-06 06:32:35 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2002-06-06 06:32:35 +0000
commit9856d93935533919f70e55e417b4059f09d09a01 (patch)
tree6941b33a31135783651228039a2971a0b11fdf86 /t
parenteec5b60da69f144765b0e2010486d337f50e5862 (diff)
parent7ca617d028f5e0c89409fa5fdbd4c8507a90e2b1 (diff)
downloadperl-9856d93935533919f70e55e417b4059f09d09a01.tar.gz
Integrate mainline
p4raw-id: //depot/perlio@17029
Diffstat (limited to 't')
-rwxr-xr-xt/op/arith.t8
-rwxr-xr-xt/op/tie.t27
2 files changed, 34 insertions, 1 deletions
diff --git a/t/op/arith.t b/t/op/arith.t
index 654ce3b857..4af49c505d 100755
--- a/t/op/arith.t
+++ b/t/op/arith.t
@@ -5,6 +5,8 @@ BEGIN {
@INC = '../lib';
}
+use Config;
+
print "1..134\n";
sub try ($$) {
@@ -277,7 +279,11 @@ tryeq_sloppy 130, 18446744073709551616/9223372036854775808, 2;
if ($^O eq 'vos') {
print "not ok 134 # TODO VOS raises SIGFPE instead of producing infinity.\n";
-} else {
+}
+elsif (($^O eq 'VMS') && !defined($Config{useieee})) {
+ print "ok 134 # SKIP -- the IEEE infinity model is unavailable in this configuration.\n";
+}
+else {
# The computation of $v should overflow and produce "infinity"
# on any system whose max exponent is less than 10**1506.
# The exact string used to represent infinity varies by OS,
diff --git a/t/op/tie.t b/t/op/tie.t
index 5a72a1b8ea..d3bd45274d 100755
--- a/t/op/tie.t
+++ b/t/op/tie.t
@@ -240,3 +240,30 @@ tie FH, 'main';
EXPECT
Can't modify constant item in tie at - line 3, near "'main';"
Execution of - aborted due to compilation errors.
+########
+
+# localizing tied hash slices
+$ENV{FooA} = 1;
+$ENV{FooB} = 2;
+print exists $ENV{FooA} ? 1 : 0, "\n";
+print exists $ENV{FooB} ? 2 : 0, "\n";
+print exists $ENV{FooC} ? 3 : 0, "\n";
+{
+ local @ENV{qw(FooA FooC)};
+ print exists $ENV{FooA} ? 4 : 0, "\n";
+ print exists $ENV{FooB} ? 5 : 0, "\n";
+ print exists $ENV{FooC} ? 6 : 0, "\n";
+}
+print exists $ENV{FooA} ? 7 : 0, "\n";
+print exists $ENV{FooB} ? 8 : 0, "\n";
+print exists $ENV{FooC} ? 9 : 0, "\n"; # this should not exist
+EXPECT
+1
+2
+0
+4
+5
+6
+7
+8
+0