From 8fad779ae21b1052268af0befa930c75d1dd780b Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 18 Dec 2016 18:35:33 -0500 Subject: Implement BSD find's -depth N --- tests.sh | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'tests.sh') diff --git a/tests.sh b/tests.sh index b1672e6..8848ebe 100755 --- a/tests.sh +++ b/tests.sh @@ -705,9 +705,39 @@ function test_0111() { bfs_diff weirdnames -nohidden } +function test_0112() { + [ "$BSD" ] || return 0 + bfs_diff basic -depth 2 +} + +function test_0113() { + [ "$BSD" ] || return 0 + bfs_diff basic -depth +2 +} + +function test_0114() { + [ "$BSD" ] || return 0 + bfs_diff basic -depth -2 +} + +function test_0115() { + [ "$BSD" ] || return 0 + bfs_diff basic -depth -depth 2 +} + +function test_0116() { + [ "$BSD" ] || return 0 + bfs_diff basic -depth -depth +2 +} + +function test_0117() { + [ "$BSD" ] || return 0 + bfs_diff basic -depth -depth -2 +} + result=0 -for i in {1..111}; do +for i in {1..117}; do test="test_$(printf '%04d' $i)" if [ -t 1 ]; then -- cgit v1.2.3