summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2017-02-10 20:46:57 -0500
committerTavian Barnes <tavianator@tavianator.com>2017-02-10 20:46:57 -0500
commit6645c6b359af84fcf32881abd838f98929aa523a (patch)
tree8737912f1f91a7fc71586de1a16219c1bf07f3b6 /tests.sh
parent7b989b55f7c90e0855ccc0685eb77104a9622a2b (diff)
downloadbfs-6645c6b359af84fcf32881abd838f98929aa523a.tar.xz
Add tests for bfs's flexible command line parsing
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index 95e7a9f..ded74ac 100755
--- a/tests.sh
+++ b/tests.sh
@@ -295,6 +295,11 @@ bfs_tests=(
test_perm_octal_plus
test_hidden
test_nohidden
+ test_path_flag_expr
+ test_path_expr_flag
+ test_flag_expr_path
+ test_expr_flag_path
+ test_expr_path_flag
)
BSD=yes
@@ -974,6 +979,26 @@ function test_printf_leak() {
bfs_diff basic -maxdepth 0 -printf '%p'
}
+function test_path_flag_expr() {
+ bfs_diff links/h -H -type l
+}
+
+function test_path_expr_flag() {
+ bfs_diff links/h -type l -H
+}
+
+function test_flag_expr_path() {
+ bfs_diff -H -type l links/h
+}
+
+function test_expr_flag_path() {
+ bfs_diff -type l -H links/h
+}
+
+function test_expr_path_flag() {
+ bfs_diff -type l links/h -H
+}
+
result=0
for test in ${!run_*}; do