From 46c3a6d6cf5cbcee6add3350b0969578ef09a06b Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 19 Aug 2024 12:44:32 -0400 Subject: [PATCH] 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 ++ .../{fprint_noerror.sh => fprint_unreached_error.sh} | 0 7 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 rename tests/gnu/{fprint_noerror.sh => fprint_unreached_error.sh} (100%) diff --git a/tests/bfs/L_noerror.out b/tests/bfs/L_noerror.out new file mode 100644 index 00000000..a514555d --- /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 00000000..7db2a4d4 --- /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 00000000..c4f8ce4f --- /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 00000000..e334f8fc --- /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 00000000..26e7e684 --- /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 00000000..ec85f4c6 --- /dev/null +++ b/tests/bfs/noerror_warn.sh @@ -0,0 +1,2 @@ +stderr=$(invoke_bfs inaccessible -noerror -warn 2>&1 >/dev/null) +[ -n "$stderr" ] diff --git a/tests/gnu/fprint_noerror.sh b/tests/gnu/fprint_unreached_error.sh similarity index 100% rename from tests/gnu/fprint_noerror.sh rename to tests/gnu/fprint_unreached_error.sh