aboutsummaryrefslogtreecommitdiffstats
path: root/test/noeffect.awk
diff options
context:
space:
mode:
Diffstat (limited to 'test/noeffect.awk')
-rw-r--r--test/noeffect.awk18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/noeffect.awk b/test/noeffect.awk
index 4be76b1e..107ccbe5 100644
--- a/test/noeffect.awk
+++ b/test/noeffect.awk
@@ -7,4 +7,22 @@ BEGIN {
42
q = 42
q
+
+ a = b = 42
+
+ a * b
+ a != b
+ # the following should not produce warnings
+ a++ == a--
+ f_without_side_effect(a);
+ f_with_side_effect(b) == 2
+ 1 == 2 && a++
+ 1 == 1 || b--
+ a = a
+ a *= 1
+ a += 0
+ a*a < 0 && b = 1001
}
+
+function f_without_side_effect(x) { }
+function f_with_side_effect(x) { }