summaryrefslogtreecommitdiff
path: root/t/op/arith.t
diff options
context:
space:
mode:
Diffstat (limited to 't/op/arith.t')
-rw-r--r--t/op/arith.t12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/op/arith.t b/t/op/arith.t
new file mode 100644
index 0000000000..43af807b8b
--- /dev/null
+++ b/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;