summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index d7e9287..87724d9 100755
--- a/tests.sh
+++ b/tests.sh
@@ -346,6 +346,8 @@ gnu_tests=(
test_or
test_comma
test_precedence
+ test_and_purity
+ test_or_purity
)
bfs_tests=(
@@ -1232,6 +1234,16 @@ function test_printx() {
bfs_diff weirdnames -printx
}
+function test_and_purity() {
+ # Regression test: (-a lhs(pure) rhs(always_false)) <==> rhs is only valid if rhs is pure
+ bfs_diff basic -name nonexistent \( -print , -false \)
+}
+
+function test_or_purity() {
+ # Regression test: (-o lhs(pure) rhs(always_true)) <==> rhs is only valid if rhs is pure
+ bfs_diff basic -name '*' -o -print
+}
+
passed=0
failed=0