summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/t/op/arith.t
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/perl5/t/op/arith.t')
-rwxr-xr-xcontrib/perl5/t/op/arith.t12
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 0000000..43af807
--- /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;
OpenPOWER on IntegriCloud