From f2023abb0ad5002078d5244e8dc17ac1cead40e4 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 27 Nov 2015 12:25:06 -0500 Subject: Implement -path. --- tests.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'tests.sh') diff --git a/tests.sh b/tests.sh index 65e439b..060448b 100755 --- a/tests.sh +++ b/tests.sh @@ -13,6 +13,9 @@ function basic_structure() { touchp "$1/e/f" mkdir -p "$1/g/h" mkdir -p "$1/i" + touchp "$1/j/foo" + touchp "$1/k/foo/bar" + touchp "$1/l/foo/bar/baz" } # Checks for any (order-independent) differences between bfs and find @@ -67,7 +70,17 @@ function test_0009() { find_diff "$1" -maxdepth 2 -depth } -for i in {1..9}; do +function test_0010() { + basic_structure "$1" + find_diff "$1" -name '*f*' +} + +function test_0011() { + basic_structure "$1" + find_diff "$1" -path "$1/*f*" +} + +for i in {1..11}; do dir="$(mktemp -d "${TMPDIR:-/tmp}"/bfs.XXXXXXXXXX)" test="test_$(printf '%04d' $i)" "$test" "$dir" -- cgit v1.2.3