From fcd08ee02a660e7c3013b073e7122be5094e8d47 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 8 Jun 2016 23:26:48 -0400 Subject: Implement -fprint and -fprint0. --- tests.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'tests.sh') diff --git a/tests.sh b/tests.sh index d4ac7fc..ead81f6 100755 --- a/tests.sh +++ b/tests.sh @@ -62,8 +62,11 @@ function make_weirdnames() { weirdnames="$(mktemp -d "${TMPDIR:-/tmp}"/bfs.weirdnames.XXXXXXXXXX)" make_weirdnames "$weirdnames" +out="$(mktemp -d "${TMPDIR:-/tmp}"/bfs.out.XXXXXXXXXX)" + # Clean up temporary directories on exit function cleanup() { + rm -rf "$out" rm -rf "$weirdnames" rm -rf "$links" rm -rf "$perms" @@ -340,7 +343,16 @@ function test_0061() { find_diff '-' '(-' '!-' ',' ')' './(' './!' \( \! -print , -print \) } -for i in {1..61}; do +function test_0062() { + find "$basic" -fprint "$out/out.find" + "$BFS" "$basic" -fprint "$out/out.bfs" + + sort -o "$out/out.find" "$out/out.find" + sort -o "$out/out.bfs" "$out/out.bfs" + diff -u "$out/out.find" "$out/out.bfs" +} + +for i in {1..62}; do test="test_$(printf '%04d' $i)" ("$test" "$dir") status=$? -- cgit v1.2.3