From 9192487a267f7052924db88d88cf381513c773d2 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 19 Oct 2022 14:29:35 -0400 Subject: tests: Coverage number go up --- tests/bfs/D_incomplete.sh | 1 + tests/bfs/D_unknown.out | 19 +++++++++++++++++++ tests/bfs/D_unknown.sh | 4 ++++ tests/bfs/O9.out | 19 +++++++++++++++++++ tests/bfs/O9.sh | 4 ++++ tests/bfs/nocolor.out | 20 ++++++++++++++++++++ tests/bfs/nocolor.sh | 1 + tests/bfs/warn.sh | 2 -- tests/bfs/warn_depth_prune.sh | 2 ++ tests/bfs/warn_exclude_path.sh | 2 ++ 10 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 tests/bfs/D_incomplete.sh create mode 100644 tests/bfs/D_unknown.out create mode 100644 tests/bfs/D_unknown.sh create mode 100644 tests/bfs/O9.out create mode 100644 tests/bfs/O9.sh create mode 100644 tests/bfs/nocolor.out create mode 100644 tests/bfs/nocolor.sh delete mode 100644 tests/bfs/warn.sh create mode 100644 tests/bfs/warn_depth_prune.sh create mode 100644 tests/bfs/warn_exclude_path.sh (limited to 'tests/bfs') 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.sh deleted file mode 100644 index 0f613c8..0000000 --- a/tests/bfs/warn.sh +++ /dev/null @@ -1,2 +0,0 @@ -stderr=$(invoke_bfs basic -warn -depth -prune 2>&1 >/dev/null) -[ -n "$stderr" ] diff --git a/tests/bfs/warn_depth_prune.sh b/tests/bfs/warn_depth_prune.sh new file mode 100644 index 0000000..0f613c8 --- /dev/null +++ b/tests/bfs/warn_depth_prune.sh @@ -0,0 +1,2 @@ +stderr=$(invoke_bfs basic -warn -depth -prune 2>&1 >/dev/null) +[ -n "$stderr" ] 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" ] -- cgit v1.2.3