Skip to content

Commit

Permalink
feat(tests): don't mess with paths
Browse files Browse the repository at this point in the history
  • Loading branch information
gorillamoe committed Sep 6, 2024
1 parent 0a64934 commit f788470
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions scripts/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,26 @@
prepare() {
local download_url=$1

if [[ -n $download_url ]]; then
if [[ ! -d _neovim ]] && [[ -n $download_url ]]; then
curl -sL "$download_url" -o _neovim/nvim && chmod +x _neovim/nvim

mkdir -p ~/.local/share/nvim/site/pack/vendor/start

fi
if [[ ! -d ~/.local/share/nvim/site/pack/vendor/plenary.nvim ]]; then
git clone --depth 1 \
https://github.com/nvim-lua/plenary.nvim \
~/.local/share/nvim/site/pack/vendor/start/plenary.nvim

fi
if [[ ! -d ~/.local/share/nvim/site/pack/start/kulala.nvim ]]; then
ln -s "$(pwd)" ~/.local/share/nvim/site/pack/vendor/start

export PATH="${PWD}/_neovim:${PATH}"
fi

nvim --headless -c 'TSInstallSync lua | quit'
}

run() {
export PATH="${PWD}/_neovim:${PATH}"
if [[ -f _neovim/nvim ]]; then
nvim() {
_neovim/nvim "$@"
}
fi

local tempfile
tempfile=$(mktemp)
Expand Down

0 comments on commit f788470

Please sign in to comment.