diff options
Diffstat (limited to 'contrib/perl5/t/op/arith.t')
-rwxr-xr-x | contrib/perl5/t/op/arith.t | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/perl5/t/op/arith.t b/contrib/perl5/t/op/arith.t new file mode 100755 index 000000000000..43af807b8b46 --- /dev/null +++ b/contrib/perl5/t/op/arith.t @@ -0,0 +1,12 @@ +#!./perl + +print "1..4\n"; + +sub try ($$) { + print +($_[1] ? "ok" : "not ok"), " $_[0]\n"; +} + +try 1, 13 % 4 == 1; +try 2, -13 % 4 == 3; +try 3, 13 % -4 == -3; +try 4, -13 % -4 == -1; |