From b6b7a68190703d30912d2a1c3d8d64e3de81a612 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 8 May 2021 11:58:09 -0400 Subject: Implement -files0-from FILE See https://savannah.gnu.org/bugs/?60383 for the development of the corresponding GNU find feature. --- tests.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'tests.sh') diff --git a/tests.sh b/tests.sh index 48fec87..46debd9 100755 --- a/tests.sh +++ b/tests.sh @@ -503,6 +503,14 @@ gnu_tests=( test_false + test_files0_from_file + test_files0_from_stdin + test_files0_from_none + test_files0_from_empty + test_files0_from_nowhere + test_files0_from_nothing + test_files0_from_ok + test_fls test_follow @@ -2999,6 +3007,35 @@ function test_flags() { bfs_diff scratch -flags -offline,nohidden } +function test_files0_from_file() { + invoke_bfs basic -fprint0 scratch/files0.in + bfs_diff -files0-from scratch/files0.in +} + +function test_files0_from_stdin() { + invoke_bfs basic -print0 | bfs_diff -files0-from - +} + +function test_files0_from_none() { + ! printf "" | quiet invoke_bfs -files0-from - +} + +function test_files0_from_empty() { + ! printf "\0" | quiet invoke_bfs -files0-from - +} + +function test_files0_from_nowhere() { + ! quiet invoke_bfs -files0-from +} + +function test_files0_from_nothing() { + ! quiet invoke_bfs -files0-from basic/nonexistent +} + +function test_files0_from_ok() { + ! printf "basic\0" | quiet invoke_bfs -files0-from - -ok echo {} \; +} + BOL= EOL='\n' -- cgit v1.2.3