summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests.sh b/tests.sh
index 4ced3c0..35f0224 100755
--- a/tests.sh
+++ b/tests.sh
@@ -439,6 +439,8 @@ gnu_tests=(
test_empty
+
+ test_exec_nothing
test_exec_substring
test_execdir
@@ -498,6 +500,8 @@ gnu_tests=(
test_nouser
+ test_ok_nothing
+
test_okdir_plus_semicolon
test_perm_000_slash
@@ -1122,7 +1126,12 @@ function test_size_big() {
}
function test_exec() {
- bfs_diff basic -exec echo '{}' ';'
+ bfs_diff basic -exec echo '{}' \;
+}
+
+function test_exec_nothing() {
+ # Regression test: don't segfault on missing command
+ ! invoke_bfs basic -exec \; 2>/dev/null
}
function test_exec_plus() {
@@ -1362,6 +1371,11 @@ function test_not_prune() {
bfs_diff basic \! \( -name foo -prune \)
}
+function test_ok_nothing() {
+ # Regression test: don't segfault on missing command
+ ! invoke_bfs basic -ok \; 2>/dev/null
+}
+
function test_ok_stdin() {
# -ok should *not* close stdin
# See https://savannah.gnu.org/bugs/?24561