From 07d294425a98ee5d1e22d03e2b24ae2c76e487c0 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Sat, 23 Aug 2025 12:42:37 +0900 Subject: updates --- mac/.config/LunarVim/utils/ci/run_test.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 mac/.config/LunarVim/utils/ci/run_test.sh (limited to 'mac/.config/LunarVim/utils/ci/run_test.sh') 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 -- cgit v1.2.3