diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-08-23 12:42:37 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-08-23 12:42:37 +0900 |
| commit | 07d294425a98ee5d1e22d03e2b24ae2c76e487c0 (patch) | |
| tree | a6818f0d64438c5fdb88b00a35d944f80c056213 /mac/.config/LunarVim/utils/ci/run_test.sh | |
| parent | 6fc28cdb3529ca8ee864cb5c41674cb0a4af72a1 (diff) | |
updates
Diffstat (limited to 'mac/.config/LunarVim/utils/ci/run_test.sh')
| -rw-r--r-- | mac/.config/LunarVim/utils/ci/run_test.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mac/.config/LunarVim/utils/ci/run_test.sh b/mac/.config/LunarVim/utils/ci/run_test.sh new file mode 100644 index 0000000..3e1bcf1 --- /dev/null +++ b/mac/.config/LunarVim/utils/ci/run_test.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +set -e + +export LUNARVIM_RUNTIME_DIR="${LUNARVIM_RUNTIME_DIR:-"$HOME/.local/share/lunarvim"}" +export LUNARVIM_BASE_DIR="${LUNARVIM_BASE_DIR:-"$LUNARVIM_RUNTIME_DIR/lvim"}" + +export LVIM_TEST_ENV=true + +# we should start with an empty configuration +LUNARVIM_CONFIG_DIR="$(mktemp -d)" +LUNARVIM_CACHE_DIR="$(mktemp -d)" + +export LUNARVIM_CONFIG_DIR LUNARVIM_CACHE_DIR + +printf "cache_dir: %s\nconfig_dir: %s\n" "$LUNARVIM_CACHE_DIR" "$LUNARVIM_CONFIG_DIR" + +lvim() { + nvim -u "$LUNARVIM_BASE_DIR/tests/minimal_init.lua" --cmd "set runtimepath+=$LUNARVIM_BASE_DIR" "$@" +} + +if [ -n "$1" ]; then + lvim --headless -c "lua require('plenary.busted').run('$1')" +else + lvim --headless -c "PlenaryBustedDirectory tests/specs { minimal_init = './tests/minimal_init.lua' }" +fi |
