summaryrefslogtreecommitdiff
path: root/tests/helpers.sh
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-06-25 12:35:12 +0300
committerPaul Buetow <paul@buetow.org>2026-06-25 12:35:12 +0300
commit12b2733dab6da12a2a6cf1d27d69bc7d143f5dfc (patch)
tree077adb3e5efc5e3a0bf9f1a5b24c38ebb264deb5 /tests/helpers.sh
parent964901d672d8e12baf4ac0eb29821d670ae15eb8 (diff)
Add runtime GNU-tool guard; document Linux-only platform support
shuriken shells out to GNU-only features of the standard Unix tools (find -printf, stat -c, cp -a, sort -R). Add require_gnu_tools in a new src/lib/compat.source.sh, sourced early and invoked from main() before any action runs. On invocation it feature-probes each tool in a throwaway temp dir; if any probe fails it prints a clear error naming the offending tool and exits 1, so non-GNU (macOS/BSD) environments fail fast instead of producing broken output. README gains a Platform compatibility section and the requirements line now mentions GNU coreutils/findutils. Tests cover the find and stat rejection paths; the shared test helper that builds a coreutils-without-imagemagick PATH now includes cp and stat (which the guard probes).
Diffstat (limited to 'tests/helpers.sh')
-rwxr-xr-xtests/helpers.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/helpers.sh b/tests/helpers.sh
index d258c79..e377737 100755
--- a/tests/helpers.sh
+++ b/tests/helpers.sh
@@ -695,6 +695,7 @@ test::install_coreutils_without_imagemagick() {
local -a names=(
basename
bash
+ cp
date
dirname
find
@@ -704,6 +705,7 @@ test::install_coreutils_without_imagemagick() {
rm
sed
sort
+ stat
tac
tar
wc