diff options
| author | kylo252 <[email protected]> | 2022-04-14 21:24:35 +0200 | 
|---|---|---|
| committer | kylo252 <[email protected]> | 2022-04-14 21:24:35 +0200 | 
| commit | 6d2e18295f510c2f2167bd911b0d421a3b7f112e (patch) | |
| tree | 453d5be502febdf596bf4b60b2d982b8b94db44a /tests/specs/config_loader_spec.lua | |
| parent | f92a0d610c1ee899ec8acb091130f2a5eec22812 (diff) | |
| parent | 09684eff642eb455bffda3100f29ef182f734a82 (diff) | |
Merge remote-tracking branch 'origin/rolling'
Diffstat (limited to 'tests/specs/config_loader_spec.lua')
| -rw-r--r-- | tests/specs/config_loader_spec.lua | 20 | 
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/specs/config_loader_spec.lua b/tests/specs/config_loader_spec.lua index 1f2debc7..40eaa350 100644 --- a/tests/specs/config_loader_spec.lua +++ b/tests/specs/config_loader_spec.lua @@ -4,16 +4,28 @@ local config = require "lvim.config"  a.describe("config-loader", function()    local user_config_path = config:get_user_config_path() +  before_each(function() +    vim.cmd [[ +	    let v:errmsg = "" +      let v:errors = [] +    ]] +  end) + +  after_each(function() +    local errmsg = vim.fn.eval "v:errmsg" +    local exception = vim.fn.eval "v:exception" +    local errors = vim.fn.eval "v:errors" +    assert.equal("", errmsg) +    assert.equal("", exception) +    assert.True(vim.tbl_isempty(errors)) +  end) +    a.it("should be able to find user-config", function()      assert.equal(user_config_path, get_config_dir() .. "/config.lua")    end)    a.it("should be able to load user-config without errors", function()      config:load(user_config_path) -    local errmsg = vim.fn.eval "v:errmsg" -    local exception = vim.fn.eval "v:exception" -    assert.equal("", errmsg) -- v:errmsg was not updated. -    assert.equal("", exception)    end)    a.it("should be able to reload user-config without errors", function()  | 
