From c8335eda8d89fe22e9e8023e4a80ebac561def34 Mon Sep 17 00:00:00 2001 From: V13Axel Date: Mon, 19 Feb 2024 13:01:34 -0500 Subject: [PATCH] Fix tests --- scripts/test | 10 ++++++++++ specs/minimal_init.vim | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/test b/scripts/test index d8b8bc1..b55c643 100755 --- a/scripts/test +++ b/scripts/test @@ -1,6 +1,16 @@ #!/bin/bash tempfile=".test_output.tmp" +# Create packpath directory +mkdir -p packpath + +# Need to clone these plugins to run tests: +git -C packpath/pack/manual/opt/plenary.nvim pull || git clone https://github.com/nvim-lua/plenary.nvim.git ./packpath/pack/manual/opt/plenary.nvim +git -C packpath/pack/manual/opt/neotest pull || git clone https://github.com/nvim-neotest/neotest.git ./packpath/pack/manual/opt/neotest +git -C packpath/pack/manual/opt/neotest-plenary pull || git clone https://github.com/nvim-neotest/neotest-plenary.git ./packpath/pack/manual/opt/neotest-plenary +git -C packpath/pack/manual/opt/nvim-treesitter pull || git clone https://github.com/nvim-treesitter/nvim-treesitter.git ./packpath/pack/manual/opt/nvim-treesitter + +# Run tests if [[ -n $1 ]]; then nvim --headless --noplugin -u specs/minimal_init.vim -c "PlenaryBustedFile $1" | tee "${tempfile}" else diff --git a/specs/minimal_init.vim b/specs/minimal_init.vim index a2d64e4..7bdb966 100644 --- a/specs/minimal_init.vim +++ b/specs/minimal_init.vim @@ -1,5 +1,6 @@ +set packpath=./packpath set rtp+=. -set rtp+=../plenary.nvim +set rtp+=./packpath/plenary.nvim packadd! plenary.nvim packadd! neotest packadd! neotest-plenary