diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2017-02-09 18:35:25 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2017-02-09 18:35:25 -0500 |
commit | 49415accb857450cdeb4397c31cbe4d6e6e9591f (patch) | |
tree | f0530479eed24de99db9bcb02527aa04339e94fd /tests.sh | |
parent | c0d14f854ffedd29cc6d53c8033c72573a63273e (diff) | |
download | bfs-49415accb857450cdeb4397c31cbe4d6e6e9591f.tar.xz |
Don't close stdin for -ok or -okdir
Turns out it violates POSIX, even though GNU find does it.
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -609,15 +609,16 @@ function test_0093() { } function test_0094() { - [ "$GNU" ] || return 0 - # -ok should close stdin for the executed command - yes | $BFS basic -ok cat ';' 2>/dev/null + [ "$BSD" ] || return 0 + # -ok should *not* close stdin + # See https://savannah.gnu.org/bugs/?24561 + yes | bfs_diff basic -ok bash -c "printf '%s? ' {} && head -n1" \; 2>/dev/null } function test_0095() { - [ "$GNU" ] || return 0 - # -okdir should close stdin for the executed command - yes | $BFS basic -okdir cat ';' 2>/dev/null + [ "$BSD" ] || return 0 + # -okdir should *not* close stdin + yes | bfs_diff basic -okdir bash -c "printf '%s? ' {} && head -n1" \; 2>/dev/null } function test_0096() { |