From 344f9c2f844b20a8ba206595c28429a196383e23 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 20 Mar 2019 18:29:16 -0400 Subject: opt: Replace -a -false/-o -true with -not when possible --- tests.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests.sh') diff --git a/tests.sh b/tests.sh index 2df3448..a219812 100755 --- a/tests.sh +++ b/tests.sh @@ -609,6 +609,7 @@ gnu_tests=( test_and_purity test_not_reachability test_comma_reachability + test_and_false_or_true ) bfs_tests=( @@ -2003,6 +2004,12 @@ function test_de_morgan_or() { bfs_diff basic \( \! -name 'foo' -o \! -type f \) } +function test_and_false_or_true() { + # Test (-a lhs(always_true) false) <==> (! lhs), + # (-a lhs(always_false) true) <==> (! lhs) + bfs_diff basic -prune -false -o -true +} + function test_data_flow_depth() { bfs_diff basic -depth +1 -depth -4 } -- cgit v1.2.3