From 46e3798fbaa5c41d73651e814f9f3212ab4c20eb Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 12 Jul 2022 23:48:39 -0400 Subject: tests: New test for -exec with unset $PATH --- tests/tests.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/tests.sh') diff --git a/tests/tests.sh b/tests/tests.sh index 64a5c0e..aec670a 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -253,6 +253,7 @@ posix_tests=( test_L_depth test_exec + test_exec_nopath test_exec_plus test_exec_plus_status test_exec_plus_semicolon @@ -1752,6 +1753,16 @@ function test_exec() { bfs_diff basic -exec echo {} \; } +function test_exec_nopath() { + ( + unset PATH + invoke_bfs basic -exec echo {} \; >"$OUT" + ) + + sort_output + diff_output +} + function test_exec_nothing() { # Regression test: don't segfault on missing command fail invoke_bfs basic -exec \; -- cgit v1.2.3