2021-03-13 22:46:45 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
|
HERE="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
|
|
|
|
|
cd $HERE/..
|
|
|
|
|
|
2021-04-17 22:41:46 +02:00
|
|
|
run() {
|
|
|
|
|
nvim --headless --noplugin -u scripts/minimal_init.lua \
|
2021-08-30 21:18:04 +03:00
|
|
|
-c "PlenaryBustedDirectory $1 { minimal_init = './scripts/minimal_init.lua' }"
|
2021-04-17 22:41:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if [[ $1 = '--summary' ]]; then
|
|
|
|
|
# really simple results summary by filtering plenary busted output
|
2021-08-30 21:18:04 +03:00
|
|
|
run tests/indent/ 2> /dev/null | grep -E '^\S*(Success|Fail(ed)?|Errors?)'
|
|
|
|
|
elif [[ $1 = '--unit' ]]; then
|
|
|
|
|
run tests/unit
|
2021-04-17 22:41:46 +02:00
|
|
|
else
|
2021-08-30 21:18:04 +03:00
|
|
|
run tests/indent/
|
2021-04-17 22:41:46 +02:00
|
|
|
fi
|