Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add test for RT #99732
  • Loading branch information
usev6 committed Sep 26, 2014
1 parent 4b5dd97 commit 3164e55
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions S03-operators/autoincrement.t
Expand Up @@ -4,7 +4,7 @@ use Test;
# Tests for auto-increment and auto-decrement operators
# originally from Perl 5, by way of t/operators/auto.t

plan 78;
plan 79;

#L<S03/Autoincrement precedence>

Expand Down Expand Up @@ -177,7 +177,7 @@ is(%z{0}, $base, '%z{0}');

{
# L<S03/Autoincrement precedence/Increment of a>

my $x = "b";
is $x.succ, 'c', '.succ for Str';
is $x.pred, 'a', '.pred for Str';
Expand All @@ -194,6 +194,13 @@ is(%z{0}, $base, '%z{0}');
# RT #63644
eval_dies_ok 'my $a; $a++ ++;', 'parse error for "$a++ ++"';

# RT #99731
{
$_ = 4;
.++;
is $_, 5, 'increment of $_ via .++';
}

# RT #113816 - autoincrement of bools
{
my Bool $x;
Expand Down Expand Up @@ -246,7 +253,7 @@ eval_dies_ok 'my $a; $a++ ++;', 'parse error for "$a++ ++"';
$y = ++$x;
is $y, True, "True preincrement returns True";
is $x, True, "True postincrement sets True";

#predecrement tests
$x = Bool;
$y = --$x;
Expand Down

0 comments on commit 3164e55

Please sign in to comment.