summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2017-07-29 21:09:30 -0400
committerTavian Barnes <tavianator@tavianator.com>2017-07-29 21:09:30 -0400
commit758bb619e8631be1773cbecb4226580c83a41651 (patch)
treee3579bc9c916dcdbfa15a8b6c435e4793f16e593 /tests.sh
parent803edcab57b8d90897f9bc96affe8b4fb0ba468a (diff)
downloadbfs-758bb619e8631be1773cbecb4226580c83a41651.tar.xz
exec: Fix more corner cases with -ok ... +
-ok should look for a ; even if it sees {} +, according to POSIX.
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index 3da8d5e..cf9e1a3 100755
--- a/tests.sh
+++ b/tests.sh
@@ -198,6 +198,7 @@ posix_tests=(
test_perm_leading_plus_symbolic_minus
test_permcopy
test_ok_stdin
+ test_ok_plus_semicolon
test_parens
test_bang
test_implicit_and
@@ -307,6 +308,7 @@ gnu_tests=(
test_execdir_slash
test_execdir_slash_pwd
test_execdir_slashes
+ test_okdir_plus_semicolon
test_weird_names
test_flag_weird_names
test_follow_comma
@@ -967,6 +969,14 @@ function test_okdir_stdin() {
yes | bfs_diff basic -okdir bash -c "printf '%s? ' {} && head -n1" \; 2>/dev/null
}
+function test_ok_plus_semicolon() {
+ yes | bfs_diff basic -ok echo '{}' + \; 2>/dev/null
+}
+
+function test_okdir_plus_semicolon() {
+ yes | bfs_diff basic -okdir echo '{}' + \; 2>/dev/null
+}
+
function test_delete() {
rm -rf scratch/*
touchp scratch/foo/bar/baz