# use strict;
-print "1..24\n";
+print "1..34\n";
my $test = 1;
$b=$b-1;
ok ($b == -(++$a), $a);
+$a = undef;
+ok ($a++ eq '0', do { $a=undef; $a++ }, "postinc undef returns '0'");
+
+$a = undef;
+ok (!defined($a--), do { $a=undef; $a-- }, "postdec undef returns undef");
+
# Verify that shared hash keys become unshared.
sub check_same {
}
check_same (\%orig, \%postdec);
+
+{
+ no warnings 'uninitialized';
+ my ($x, $y);
+ eval {
+ $y ="$x\n";
+ ++$x;
+ };
+ ok($x == 1, $x);
+ ok($@ eq '', $@);
+
+ my ($p, $q);
+ eval {
+ $q ="$p\n";
+ --$p;
+ };
+ ok($p == -1, $p);
+ ok($@ eq '', $@);
+}
+
+$a = 2147483648;
+$c=--$a;
+ok ($a == 2147483647, $a);
+
+
+$a = 2147483648;
+$c=$a--;
+ok ($a == 2147483647, $a);
+
+{
+ use integer;
+ my $x = 0;
+ $x++;
+ ok ($x == 1, "(void) i_postinc");
+ $x--;
+ ok ($x == 0, "(void) i_postdec");
+}