nvim-treesitter/scripts/run_tests.sh
Christian Clason 008cc677d2 fix tests
disable Windows tests for now (hang on parser compile)
2023-09-09 16:17:03 +02:00

16 lines
458 B
Bash
Executable file

#!/usr/bin/env bash
HERE="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
cd $HERE/..
run() {
nvim --headless --noplugin -u scripts/minimal_init.lua \
-c "PlenaryBustedDirectory $1 { minimal_init = './scripts/minimal_init.lua' }"
}
if [[ $2 = '--summary' ]]; then
## really simple results summary by filtering plenary busted output
run tests/$1 2> /dev/null | grep -E '^\S*(Testing|Success|Failed|Errors)\s*:'
else
run tests/$1
fi