2021-11-25 21:40:13 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Install or update the specs
|
|
|
|
if [[ ! -d spec ]]; then
|
|
|
|
git clone https://github.com/mustache/spec.git spec
|
|
|
|
else
|
|
|
|
(
|
2023-04-08 16:52:22 +00:00
|
|
|
cd spec
|
2021-11-25 21:40:13 +00:00
|
|
|
git pull
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
2023-04-08 17:41:46 +00:00
|
|
|
if [[ "$BASH_VERSION" == 3.* ]]; then
|
|
|
|
echo "WARNING! Specs assume you are using a version of Bash with associative arrays!"
|
|
|
|
fi
|
|
|
|
|
2021-11-25 21:40:13 +00:00
|
|
|
# Actually run the specs
|
|
|
|
node run-spec.js spec/specs/*.json
|
|
|
|
|
2023-04-08 17:41:46 +00:00
|
|
|
if [[ "$BASH_VERSION" == 3.* ]]; then
|
|
|
|
echo "Some tests may have failed because they assume Bash supports associative arays"
|
|
|
|
fi
|