From 46c3a6d6cf5cbcee6add3350b0969578ef09a06b Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 19 Aug 2024 12:44:32 -0400 Subject: tests/bfs: Add -noerror tests --- tests/bfs/L_noerror.out | 11 +++++++++++ tests/bfs/L_noerror.sh | 1 + tests/bfs/noerror.out | 4 ++++ tests/bfs/noerror.sh | 1 + tests/bfs/noerror_nowarn.sh | 2 ++ tests/bfs/noerror_warn.sh | 2 ++ 6 files changed, 21 insertions(+) create mode 100644 tests/bfs/L_noerror.out create mode 100644 tests/bfs/L_noerror.sh create mode 100644 tests/bfs/noerror.out create mode 100644 tests/bfs/noerror.sh create mode 100644 tests/bfs/noerror_nowarn.sh create mode 100644 tests/bfs/noerror_warn.sh (limited to 'tests/bfs') diff --git a/tests/bfs/L_noerror.out b/tests/bfs/L_noerror.out new file mode 100644 index 0000000..a514555 --- /dev/null +++ b/tests/bfs/L_noerror.out @@ -0,0 +1,11 @@ +loops +loops/broken +loops/deeply +loops/deeply/nested +loops/deeply/nested/dir +loops/file +loops/notdir +loops/skip +loops/skip/dir +loops/skip/loop +loops/symlink diff --git a/tests/bfs/L_noerror.sh b/tests/bfs/L_noerror.sh new file mode 100644 index 0000000..7db2a4d --- /dev/null +++ b/tests/bfs/L_noerror.sh @@ -0,0 +1 @@ +bfs_diff -L loops -noerror diff --git a/tests/bfs/noerror.out b/tests/bfs/noerror.out new file mode 100644 index 0000000..c4f8ce4 --- /dev/null +++ b/tests/bfs/noerror.out @@ -0,0 +1,4 @@ +inaccessible +inaccessible/dir +inaccessible/file +inaccessible/link diff --git a/tests/bfs/noerror.sh b/tests/bfs/noerror.sh new file mode 100644 index 0000000..e334f8f --- /dev/null +++ b/tests/bfs/noerror.sh @@ -0,0 +1 @@ +bfs_diff inaccessible -noerror diff --git a/tests/bfs/noerror_nowarn.sh b/tests/bfs/noerror_nowarn.sh new file mode 100644 index 0000000..26e7e68 --- /dev/null +++ b/tests/bfs/noerror_nowarn.sh @@ -0,0 +1,2 @@ +stderr=$(invoke_bfs inaccessible -noerror -nowarn 2>&1 >/dev/null) +[ -z "$stderr" ] diff --git a/tests/bfs/noerror_warn.sh b/tests/bfs/noerror_warn.sh new file mode 100644 index 0000000..ec85f4c --- /dev/null +++ b/tests/bfs/noerror_warn.sh @@ -0,0 +1,2 @@ +stderr=$(invoke_bfs inaccessible -noerror -warn 2>&1 >/dev/null) +[ -n "$stderr" ] -- cgit v1.2.3