summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2015-09-15 17:47:22 -0400
committerTavian Barnes <tavianator@tavianator.com>2015-09-15 17:47:22 -0400
commit224f01a6508cececfb327f7692fcab2afb992805 (patch)
tree879fdc5efb4386aa2e34c54e8623bbfda723bb48 /tests.sh
parentf2c9a7dbca9da36aa0cca8c4d0759e4d0406df91 (diff)
downloadbfs-224f01a6508cececfb327f7692fcab2afb992805.tar.xz
Fix -maxdepth handling when -depth is set.
Lost some data due to this bug :(.
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests.sh b/tests.sh
index f7d16fd..9c7c397 100755
--- a/tests.sh
+++ b/tests.sh
@@ -47,12 +47,24 @@ function test_0005() {
find_diff "$1" -maxdepth 1
}
-for i in {1..5}; do
+function test_0006() {
+ basic_structure "$1"
+ find_diff "$1" -mindepth 1 -depth
+}
+
+function test_0007() {
+ basic_structure "$1"
+ find_diff "$1" -maxdepth 1 -depth
+}
+
+for i in {1..7}; do
dir="$(mktemp -d)"
- test_$(printf '%04d' $i) "$dir"
+ test="test_$(printf '%04d' $i)"
+ "$test" "$dir"
status=$?
rm -rf "$dir"
if [ $status -ne 0 ]; then
+ echo "$test failed!" >&2
exit $status
fi
done