summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-01-31 20:58:43 -0500
committerTavian Barnes <tavianator@tavianator.com>2024-01-31 21:05:31 -0500
commit670ebd97fb431e830b1500b2e7e8013b121fb2c5 (patch)
tree6c63d7a1c4bb6702040d970b6db3786dfe1e4aa8 /tests
parenta726c7128ab5c6fffeb6844f3d819ada0369e6a8 (diff)
downloadbfs-670ebd97fb431e830b1500b2e7e8013b121fb2c5.tar.xz
bftw: Actually stop if the callback returns BFTW_STOP
Otherwise, bftw_ids() or bftw_eds() might keep going! Fixes: 5f16169 ("bftw: Share the bftw_state between iterations of ids/eds")
Diffstat (limited to 'tests')
-rw-r--r--tests/bsd/s_quit.out1
-rw-r--r--tests/bsd/s_quit.sh4
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/bsd/s_quit.out b/tests/bsd/s_quit.out
new file mode 100644
index 0000000..5ea492b
--- /dev/null
+++ b/tests/bsd/s_quit.out
@@ -0,0 +1 @@
+basic/j/foo
diff --git a/tests/bsd/s_quit.sh b/tests/bsd/s_quit.sh
new file mode 100644
index 0000000..6bd55ab
--- /dev/null
+++ b/tests/bsd/s_quit.sh
@@ -0,0 +1,4 @@
+# Regression test: bfs -S ids -s -name foo -quit would not actually quit,
+# ending up in a confused state and erroring/crashing
+
+bfs_diff -s basic -name foo -print -quit