summaryrefslogtreecommitdiffstats
path: root/tests/bfs
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-10-19 14:29:35 -0400
committerTavian Barnes <tavianator@tavianator.com>2022-10-19 15:00:08 -0400
commit9192487a267f7052924db88d88cf381513c773d2 (patch)
tree6b18e91aed54c1477434dfb1c67479e0f26aac7a /tests/bfs
parent49a2a2194bfde0b70aac72bd7f2d0e02c62858ef (diff)
downloadbfs-9192487a267f7052924db88d88cf381513c773d2.tar.xz
tests: Coverage number go up
Diffstat (limited to 'tests/bfs')
-rw-r--r--tests/bfs/D_incomplete.sh1
-rw-r--r--tests/bfs/D_unknown.out19
-rw-r--r--tests/bfs/D_unknown.sh4
-rw-r--r--tests/bfs/O9.out19
-rw-r--r--tests/bfs/O9.sh4
-rw-r--r--tests/bfs/nocolor.out20
-rw-r--r--tests/bfs/nocolor.sh1
-rw-r--r--tests/bfs/warn_depth_prune.sh (renamed from tests/bfs/warn.sh)0
-rw-r--r--tests/bfs/warn_exclude_path.sh2
9 files changed, 70 insertions, 0 deletions
diff --git a/tests/bfs/D_incomplete.sh b/tests/bfs/D_incomplete.sh
new file mode 100644
index 0000000..396d365
--- /dev/null
+++ b/tests/bfs/D_incomplete.sh
@@ -0,0 +1 @@
+fail invoke_bfs -D
diff --git a/tests/bfs/D_unknown.out b/tests/bfs/D_unknown.out
new file mode 100644
index 0000000..a7ccfe4
--- /dev/null
+++ b/tests/bfs/D_unknown.out
@@ -0,0 +1,19 @@
+basic
+basic/a
+basic/b
+basic/c
+basic/c/d
+basic/e
+basic/e/f
+basic/g
+basic/g/h
+basic/i
+basic/j
+basic/j/foo
+basic/k
+basic/k/foo
+basic/k/foo/bar
+basic/l
+basic/l/foo
+basic/l/foo/bar
+basic/l/foo/bar/baz
diff --git a/tests/bfs/D_unknown.sh b/tests/bfs/D_unknown.sh
new file mode 100644
index 0000000..e3614ba
--- /dev/null
+++ b/tests/bfs/D_unknown.sh
@@ -0,0 +1,4 @@
+stderr=$(invoke_bfs -warn -D unknown basic 2>&1 >"$OUT")
+[ -n "$stderr" ] || return 1
+sort_output
+diff_output
diff --git a/tests/bfs/O9.out b/tests/bfs/O9.out
new file mode 100644
index 0000000..a7ccfe4
--- /dev/null
+++ b/tests/bfs/O9.out
@@ -0,0 +1,19 @@
+basic
+basic/a
+basic/b
+basic/c
+basic/c/d
+basic/e
+basic/e/f
+basic/g
+basic/g/h
+basic/i
+basic/j
+basic/j/foo
+basic/k
+basic/k/foo
+basic/k/foo/bar
+basic/l
+basic/l/foo
+basic/l/foo/bar
+basic/l/foo/bar/baz
diff --git a/tests/bfs/O9.sh b/tests/bfs/O9.sh
new file mode 100644
index 0000000..12f6c2d
--- /dev/null
+++ b/tests/bfs/O9.sh
@@ -0,0 +1,4 @@
+stderr=$(invoke_bfs -warn -O9 basic 2>&1 >"$OUT")
+[ -n "$stderr" ] || return 1
+sort_output
+diff_output
diff --git a/tests/bfs/nocolor.out b/tests/bfs/nocolor.out
new file mode 100644
index 0000000..b53fe03
--- /dev/null
+++ b/tests/bfs/nocolor.out
@@ -0,0 +1,20 @@
+rainbow
+rainbow/broken
+rainbow/chardev_link
+rainbow/exec.sh
+rainbow/file.dat
+rainbow/file.txt
+rainbow/link.txt
+rainbow/mh1
+rainbow/mh2
+rainbow/ow
+rainbow/pipe
+rainbow/sgid
+rainbow/socket
+rainbow/star.gz
+rainbow/star.tar
+rainbow/star.tar.gz
+rainbow/sticky
+rainbow/sticky_ow
+rainbow/sugid
+rainbow/suid
diff --git a/tests/bfs/nocolor.sh b/tests/bfs/nocolor.sh
new file mode 100644
index 0000000..8dace0b
--- /dev/null
+++ b/tests/bfs/nocolor.sh
@@ -0,0 +1 @@
+bfs_diff rainbow -nocolor
diff --git a/tests/bfs/warn.sh b/tests/bfs/warn_depth_prune.sh
index 0f613c8..0f613c8 100644
--- a/tests/bfs/warn.sh
+++ b/tests/bfs/warn_depth_prune.sh
diff --git a/tests/bfs/warn_exclude_path.sh b/tests/bfs/warn_exclude_path.sh
new file mode 100644
index 0000000..988544e
--- /dev/null
+++ b/tests/bfs/warn_exclude_path.sh
@@ -0,0 +1,2 @@
+stderr=$(invoke_bfs -warn -exclude basic -name '*f*' 2>&1 >/dev/null)
+[ -n "$stderr" ]