diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2017-07-29 21:09:30 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2017-07-29 21:09:30 -0400 |
commit | 758bb619e8631be1773cbecb4226580c83a41651 (patch) | |
tree | e3579bc9c916dcdbfa15a8b6c435e4793f16e593 /tests.sh | |
parent | 803edcab57b8d90897f9bc96affe8b4fb0ba468a (diff) | |
download | bfs-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-x | tests.sh | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 |