From 0f91c5861cacaeb17729b7727d07260273345393 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 4 Feb 2016 23:12:08 -0500 Subject: Implement -P and -H. --- tests.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'tests.sh') diff --git a/tests.sh b/tests.sh index ffb110d..0a2f60a 100755 --- a/tests.sh +++ b/tests.sh @@ -35,6 +35,7 @@ function links_structure() { ln "$1/a" "$1/c" mkdir -p "$1/d/e" ln -s ../../d "$1/d/e/f" + touchp "$1/d/e/g" } # Checks for any (order-independent) differences between bfs and find @@ -150,7 +151,24 @@ function test_0020() { find_diff "$1" -links +1 } -for i in {1..20}; do +function test_0021() { + links_structure "$1" + find_diff -P "$1/d/e/f" && \ + find_diff -P "$1/d/e/f/" +} + +function test_0022() { + links_structure "$1" + find_diff -H "$1/d/e/f" && \ + find_diff -H "$1/d/e/f/" +} + +function test_0023() { + links_structure "$1" + find_diff -H "$1" -newer "$1/d/e/f" +} + +for i in {1..23}; do dir="$(mktemp -d "${TMPDIR:-/tmp}"/bfs.XXXXXXXXXX)" test="test_$(printf '%04d' $i)" "$test" "$dir" -- cgit v1.2.3