summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-06-07 14:04:20 -0400
committerTavian Barnes <tavianator@tavianator.com>2020-06-07 15:16:10 -0400
commit1bce3b33acbfcfbfa03f1174d6e00c125cd8625d (patch)
tree9cb9efd81d667b711845878310afb39183cae847 /tests.sh
parentfaee855b1e886dacc999e1dccf7f8e2c750f33c6 (diff)
downloadbfs-1bce3b33acbfcfbfa03f1174d6e00c125cd8625d.tar.xz
Implement -exclude, a special form for convenient exclusions
Fixes #8.
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index c84907c..c428c65 100755
--- a/tests.sh
+++ b/tests.sh
@@ -596,6 +596,12 @@ bfs_tests=(
test_S_dfs
test_S_ids
+ # Special forms
+
+ test_exclude_name
+ test_exclude_depth
+ test_exclude_mindepth
+
# Primaries
test_color
@@ -2630,6 +2636,18 @@ function test_S_ids() {
test_S ids
}
+function test_exclude_name() {
+ bfs_diff basic -exclude -name foo
+}
+
+function test_exclude_depth() {
+ bfs_diff basic -depth -exclude -name foo
+}
+
+function test_exclude_mindepth() {
+ bfs_diff basic -mindepth 3 -exclude -name foo
+}
+
BOL=
EOL='\n'