From 758bb619e8631be1773cbecb4226580c83a41651 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 29 Jul 2017 21:09:30 -0400 Subject: exec: Fix more corner cases with -ok ... + -ok should look for a ; even if it sees {} +, according to POSIX. --- tests.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests.sh') 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 -- cgit v1.2.3