diff --git a/tests/ifquery_test b/tests/ifquery_test index e095255..92a4b6b 100755 --- a/tests/ifquery_test +++ b/tests/ifquery_test @@ -34,7 +34,9 @@ tests_init \ vlan_explicit_learned_dependency \ vlan_guessed_learned_dependency \ vlan_complex_learned_dependency \ - wireguard + wireguard \ + allow_undefined_positive \ + allow_undefined_negative noargs_body() { atf_check -s exit:1 -e ignore ifquery -S/dev/null @@ -226,3 +228,17 @@ wireguard_body() { -o match:"use wireguard" \ ifquery -E $EXECUTORS_LINUX -i $FIXTURES/wireguard.interfaces wg0 } + +allow_undefined_positive_body() { + atf_check -s exit:0 \ + -o ignore \ + -e ignore \ + ifquery -U -i /dev/null -p address foo +} + +allow_undefined_negative_body() { + atf_check -s exit:1 \ + -o ignore \ + -e ignore \ + ifquery -i /dev/null -p address foo +}