From 61caf62943d04b6bded6325d6d0fa4e7fbde343f Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Mon, 17 Jan 2022 13:13:34 +0100 Subject: refactor: remove unused outdated files (#2184) --- utils/ci/run_test.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 utils/ci/run_test.sh (limited to 'utils/ci') diff --git a/utils/ci/run_test.sh b/utils/ci/run_test.sh new file mode 100644 index 00000000..5b7f81ac --- /dev/null +++ b/utils/ci/run_test.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +set -e + +export LUNARVIM_RUNTIME_DIR="${LUNARVIM_RUNTIME_DIR:-"$HOME/.local/share/lunarvim"}" + +export LVIM_TEST_ENV=true + +# we should start with an empty configuration +TEST_BASE_DIR="$(mktemp -d)" + +export LUNARVIM_CONFIG_DIR="$TEST_BASE_DIR" +export LUNARVIM_CACHE_DIR="$TEST_BASE_DIR" + +lvim() { + nvim -u "$LUNARVIM_RUNTIME_DIR/lvim/tests/minimal_init.lua" --cmd "set runtimepath+=$LUNARVIM_RUNTIME_DIR/lvim" "$@" +} + +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 + +rm -rf "$TEST_BASE_DIR" -- cgit v1.2.3