summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-03-28 10:16:03 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-03-28 11:38:50 -0400
commit99a362d04b507c7c0436c06f087f3d0d3abdc665 (patch)
treee9764de9faeb4d4ec912615c6d6a8c360419a9e9
parentcd929976f8beb208c0c3524ae11de6ceed941324 (diff)
downloadbfs-99a362d04b507c7c0436c06f087f3d0d3abdc665.tar.xz
tests/common: Add a -delete error handling test
-rw-r--r--tests/common/delete_error.out8
-rw-r--r--tests/common/delete_error.sh9
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/common/delete_error.out b/tests/common/delete_error.out
new file mode 100644
index 0000000..b6b6505
--- /dev/null
+++ b/tests/common/delete_error.out
@@ -0,0 +1,8 @@
+.
+.
+./baz
+./baz
+./baz/qux
+./baz/qux
+./foo
+./foo/bar
diff --git a/tests/common/delete_error.sh b/tests/common/delete_error.sh
new file mode 100644
index 0000000..e6327f3
--- /dev/null
+++ b/tests/common/delete_error.sh
@@ -0,0 +1,9 @@
+cd "$TEST"
+
+"$XTOUCH" -p foo/bar baz/qux
+chmod -w foo
+defer chmod +w foo
+
+! invoke_bfs . -print -delete -print >"$OUT" || fail
+sort_output
+diff_output