diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2021-05-08 11:58:09 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2021-09-15 13:56:20 -0400 |
commit | b6b7a68190703d30912d2a1c3d8d64e3de81a612 (patch) | |
tree | d99e0b9dd0060deed2980b43a99fd2f359f9ad30 /tests.sh | |
parent | b2d85ea84c930ebcfefc6449414ed64cd80e2f89 (diff) | |
download | bfs-b6b7a68190703d30912d2a1c3d8d64e3de81a612.tar.xz |
Implement -files0-from FILE
See https://savannah.gnu.org/bugs/?60383 for the development of the
corresponding GNU find feature.
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 37 |
1 files changed, 37 insertions, 0 deletions
@@ -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' |