aboutsummaryrefslogtreecommitdiff
path: root/test/002-test-key-name.test
diff options
context:
space:
mode:
authorDavid Phillips <david@yeah.nah.nz>2020-09-05 16:31:59 +1200
committerDavid Phillips <david@yeah.nah.nz>2020-09-05 16:31:59 +1200
commited8219fd686986b95d64dc58f53a9e3cd8ea3c67 (patch)
tree6623d51c7d1645570227078a2b0eef7e8a0c38bc /test/002-test-key-name.test
parent5dd638fecd5c31b019c62ebb817bdef11a8a49b2 (diff)
downloadsand-leek-ed8219fd686986b95d64dc58f53a9e3cd8ea3c67.tar.xz
Switch mapfile for explicit loopHEADmaster
Fixes issue on stock Mac OS with older bash
Diffstat (limited to 'test/002-test-key-name.test')
-rwxr-xr-xtest/002-test-key-name.test/run.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/002-test-key-name.test/run.sh b/test/002-test-key-name.test/run.sh
index 0f7df69..f0ed1ec 100755
--- a/test/002-test-key-name.test/run.sh
+++ b/test/002-test-key-name.test/run.sh
@@ -15,7 +15,10 @@ stderr="$(mktemp)"
# Four character search should be a < 1 second CPU burst for CI runner
${EXECUTABLE} -s site > "$key" 2>"$stderr"
-mapfile -t found < <(tr '\r' '\n' < "$stderr" | grep Found | cut -d ' ' -f 3)
+# no mapfile, Mac OS compat
+while IFS= read -r domain ; do
+ found+=("$domain")
+done < <(tr '\r' '\n' < "$stderr" | grep Found | cut -d ' ' -f 3)
echo "sand-leek says it found ${found[*]}..."