summaryrefslogtreecommitdiff
path: root/t/op/pack.t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-05-14 10:53:55 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-05-14 10:53:55 +0000
commit20408e3ccf502b6ce4033d8203710405ec9ef8f6 (patch)
treeafa7181c847061200a7323363f84fe42102c2aa3 /t/op/pack.t
parent9b599b2a63d2324ddacddd9710c41b795a95070d (diff)
downloadperl-20408e3ccf502b6ce4033d8203710405ec9ef8f6.tar.gz
[win32] merge change#896 from maintbranch
p4raw-link: @896 on //depot/maint-5.004/perl: 0562b9ae2b0eff79632fc0164c13c34c06a019e2 p4raw-id: //depot/win32/perl@938
Diffstat (limited to 't/op/pack.t')
-rwxr-xr-xt/op/pack.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/op/pack.t b/t/op/pack.t
index f9a89a3ec0..de5fcff218 100755
--- a/t/op/pack.t
+++ b/t/op/pack.t
@@ -2,7 +2,7 @@
# $RCSfile: pack.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:11 $
-print "1..29\n";
+print "1..30\n";
$format = "c2 x5 C C x s d i l a6";
# Need the expression in here to force ary[5] to be numeric. This avoids
@@ -100,3 +100,9 @@ sub foo { my $a = "a"; return $a . $a++ . $a++ }
# undef should give null pointer
print((pack("p", undef) =~ /^\0+/ ? "ok " : "not ok "),$test++,"\n");
+# Check for optimizer bug (e.g. Digital Unix GEM cc with -O4 on DU V4.0B gives
+# 4294967295 instead of -1)
+# see #ifdef __osf__ in pp.c pp_unpack
+# Test 30:
+print( ((unpack("i",pack("i",-1))) == -1 ? "ok " : "not ok "),$test++,"\n");
+