From 7ba7829a05c07c4a831fb114211ff7768c93fc94 Mon Sep 17 00:00:00 2001 From: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com> Date: Fri, 22 Oct 2021 10:19:29 +0600 Subject: [PATCH] fixup: fix failing tests --- .gitignore | 10 ++++++---- Makefile | 4 ++-- lua/tests/spec/component_spec.lua | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index bf9a09e..6c56a4a 100644 --- a/.gitignore +++ b/.gitignore @@ -43,13 +43,15 @@ luac.out tags # helptags -doc/tags +/doc/tags # panvimdoc /panvimdoc/ # luacov -luacov.report -luacov.report.index -luacov.stats +/luacov.report +/luacov.report.index +/luacov.stats +# tests +/tmp_home/ diff --git a/Makefile b/Makefile index 4f568ca..860cc2b 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ test: @export XDG_DATA_HOME='./tmp_home' && \ export XDG_CONFIG_HOME='./tmp_home' && \ nvim --headless --noplugin --clean -u lua/tests/minimal_init.lua -c "lua require'plenary.test_harness'.test_directory( 'lua/tests/', { minimal_init = './lua/tests/minimal_init.lua' })" - @rmdir tmp_home + @rm -rf tmp_home # Install luacov & luacov-console from luarocks testcov: @@ -27,7 +27,7 @@ testcov: ifeq ($(NOCLEAN), ) @rm luacov.* endif - @rmdir tmp_home + @rm -rf tmp_home docgen: @bash ./scripts/docgen.sh diff --git a/lua/tests/spec/component_spec.lua b/lua/tests/spec/component_spec.lua index 5d616cc..18ed4a8 100644 --- a/lua/tests/spec/component_spec.lua +++ b/lua/tests/spec/component_spec.lua @@ -347,7 +347,7 @@ describe('Location component', function() component_separators = { left = '', right = '' }, padding = 0, } - assert_component('location', opts, '%3l:%-2c') + assert_component('location', opts, '%3l:%-2v') end) end) @@ -357,7 +357,7 @@ describe('Progress component', function() component_separators = { left = '', right = '' }, padding = 0, } - assert_component('progress', opts, '%3P') + assert_component('progress', opts, '%3p%%') end) end)