summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-06-08 23:26:48 -0400
committerTavian Barnes <tavianator@tavianator.com>2016-06-08 23:26:48 -0400
commitfcd08ee02a660e7c3013b073e7122be5094e8d47 (patch)
tree915bb5c2e1d0ed34d1a45c091f3b8f8972413653 /tests.sh
parent593e2135a98b66999f3143c70dd5169701972906 (diff)
downloadbfs-fcd08ee02a660e7c3013b073e7122be5094e8d47.tar.xz
Implement -fprint and -fprint0.
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh14
1 files changed, 13 insertions, 1 deletions
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=$?