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() {
|
2023-05-29 16:52:20 +02:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
2021-11-20 15:14:09 +01:00
|
|
|
if [[ $2 = '--summary' ]]; then
|
|
|
|
|
## really simple results summary by filtering plenary busted output
|
2022-12-07 10:47:08 -08:00
|
|
|
run tests/$1 2> /dev/null | grep -E '^\S*(Testing|Success|Failed|Errors)\s*:'
|
2021-04-17 22:41:46 +02:00
|
|
|
else
|
2021-11-20 15:14:09 +01:00
|
|
|
run tests/$1
|
2021-04-17 22:41:46 +02:00
|
|
|
fi
|