summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-03-05 17:16:12 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-03-05 17:16:12 +0000
commitf69763b06909a72bacc3730622752f9777f5cbc1 (patch)
tree21f440f7befcce18d600cb71d9d5c7b5f01b3efd /t
parent5e6c239f964b3cbc996695ce62f095f589a2f96e (diff)
parent39bac7f7f5a36515e5edfd18fa0ae05b4fb933ec (diff)
downloadperl-f69763b06909a72bacc3730622752f9777f5cbc1.tar.gz
Integrate with Sarathy.
p4raw-id: //depot/cfgperl@5546
Diffstat (limited to 't')
-rw-r--r--t/op/64bit.t64
-rw-r--r--t/pod/poderrs.xr9
-rw-r--r--t/pragma/strict-vars9
3 files changed, 65 insertions, 17 deletions
diff --git a/t/op/64bit.t b/t/op/64bit.t
index 9648598bc5..da9cedd22e 100644
--- a/t/op/64bit.t
+++ b/t/op/64bit.t
@@ -1,3 +1,5 @@
+#./perl
+
BEGIN {
eval { my $q = pack "q", 0 };
if ($@) {
@@ -17,7 +19,7 @@ BEGIN {
# 32+ bit integers don't cause noise
no warnings qw(overflow portable);
-print "1..42\n";
+print "1..48\n";
my $q = 12345678901;
my $r = 23456789012;
@@ -136,7 +138,7 @@ $x = 98765432109 % 12345678901;
print "not " unless $x == 901;
print "ok 25\n";
-# The following six adapted from op/inc.
+# The following 12 tests adapted from op/inc.
$a = 9223372036854775807;
$c = $a++;
@@ -168,40 +170,76 @@ $c = $a - 1;
print "not " unless $a == -9223372036854775808 && $c == -9223372036854775809;
print "ok 31\n";
+$a = 9223372036854775808;
+$a = -$a;
+$c = $a--;
+print "not " unless $a == -9223372036854775809 && $c == -9223372036854775808;
+print "ok 32\n";
+
+$a = 9223372036854775808;
+$a = -$a;
+$c = --$a;
+print "not " unless $a == -9223372036854775809 && $c == $a;
+print "ok 33\n";
+
+$a = 9223372036854775808;
+$a = -$a;
+$c = $a - 1;
+print "not " unless $a == -9223372036854775808 && $c == -9223372036854775809;
+print "ok 34\n";
+
+$a = 9223372036854775808;
+$b = -$a;
+$c = $b--;
+print "not " unless $b == -$a-1 && $c == -$a;
+print "ok 35\n";
+
+$a = 9223372036854775808;
+$b = -$a;
+$c = --$b;
+print "not " unless $b == -$a-1 && $c == $b;
+print "ok 36\n";
+
+$a = 9223372036854775808;
+$b = -$a;
+$b = $b - 1;
+print "not " unless $b == -(++$a);
+print "ok 37\n";
+
$x = '';
print "not " unless (vec($x, 1, 64) = $q) == $q;
-print "ok 32\n";
+print "ok 38\n";
print "not " unless vec($x, 1, 64) == $q && vec($x, 1, 64) > $f;
-print "ok 33\n";
+print "ok 39\n";
print "not " unless vec($x, 0, 64) == 0 && vec($x, 2, 64) == 0;
-print "ok 34\n";
+print "ok 40\n";
print "not " unless ~0 == 0xffffffffffffffff;
-print "ok 35\n";
+print "ok 41\n";
print "not " unless (0xffffffff<<32) == 0xffffffff00000000;
-print "ok 36\n";
+print "ok 42\n";
print "not " unless ((0xffffffff)<<32)>>32 == 0xffffffff;
-print "ok 37\n";
+print "ok 43\n";
print "not " unless 1<<63 == 0x8000000000000000;
-print "ok 38\n";
+print "ok 44\n";
print "not " unless (sprintf "%#Vx", 1<<63) eq '0x8000000000000000';
-print "ok 39\n";
+print "ok 45\n";
print "not " unless (0x8000000000000000 | 1) == 0x8000000000000001;
-print "ok 40\n";
+print "ok 46\n";
print "not " unless (0xf000000000000000 & 0x8000000000000000) == 0x8000000000000000;
-print "ok 41\n";
+print "ok 47\n";
print "not " unless (0xf000000000000000 ^ 0xfffffffffffffff0) == 0x0ffffffffffffff0;
-print "ok 42\n";
+print "ok 48\n";
# eof
diff --git a/t/pod/poderrs.xr b/t/pod/poderrs.xr
index 17baee91d1..b8e5e86fd5 100644
--- a/t/pod/poderrs.xr
+++ b/t/pod/poderrs.xr
@@ -3,9 +3,10 @@
*** ERROR: Unknown interior-sequence 'A' at line 30 in file pod/poderrs.t
*** ERROR: Unknown interior-sequence 'Y' at line 31 in file pod/poderrs.t
*** ERROR: Unknown interior-sequence 'V' at line 31 in file pod/poderrs.t
-*** WARNING: unterminated B<...> at line 35 in file pod/poderrs.t
-*** WARNING: unterminated I<...> at line 34 in file pod/poderrs.t
-*** WARNING: unterminated C<...> at line 37 in file pod/poderrs.t
+*** ERROR: unterminated B<...> at line 35 in file pod/poderrs.t
+*** ERROR: unterminated I<...> at line 34 in file pod/poderrs.t
+*** ERROR: unterminated C<...> at line 37 in file pod/poderrs.t
+*** WARNING: line containing nothing but whitespace in paragraph at line 45 in file pod/poderrs.t
*** ERROR: =item without previous =over at line 52 in file pod/poderrs.t
*** ERROR: =back without previous =over at line 56 in file pod/poderrs.t
*** ERROR: =over on line 60 without closing =back (at head2) at line 64 in file pod/poderrs.t
@@ -29,4 +30,4 @@
*** ERROR: unresolved internal link 'abc def' at line 96 in file pod/poderrs.t
*** ERROR: unresolved internal link 'passwd(5)' at line 103 in file pod/poderrs.t
*** WARNING: multiple occurence of link target 'oops' at line - in file pod/poderrs.t
-pod/poderrs.t has 22 pod syntax errors.
+pod/poderrs.t has 25 pod syntax errors.
diff --git a/t/pragma/strict-vars b/t/pragma/strict-vars
index 9352c4b04c..954d1e5ab4 100644
--- a/t/pragma/strict-vars
+++ b/t/pragma/strict-vars
@@ -27,6 +27,15 @@ EXPECT
# strict vars - no error
use strict 'vars' ;
use vars qw( $freddy) ;
+BEGIN { *freddy = \$joe::shmoe; }
+$freddy = 2 ;
+EXPECT
+
+########
+
+# strict vars - no error
+use strict 'vars' ;
+use vars qw( $freddy) ;
local $abc::joe ;
my $fred ;
my $b = \$fred ;