diff --git a/spec/lua/cmdbuf/handler/lua/cmd_spec.lua b/spec/lua/cmdbuf/handler/lua/cmd_spec.lua index 472e43e..a6559c1 100644 --- a/spec/lua/cmdbuf/handler/lua/cmd_spec.lua +++ b/spec/lua/cmdbuf/handler/lua/cmd_spec.lua @@ -1,5 +1,6 @@ local helper = require("cmdbuf.test.helper") local cmdbuf = helper.require("cmdbuf") +local assert = require("assertlib").typed(assert) describe("lua/cmd handler", function() before_each(helper.before_each) @@ -104,7 +105,7 @@ describe("lua/cmd handler", function() helper.execute_as_expr_keymap(cmdbuf.cmdline_expr() .. "1") - assert.equals(18888, vim.b.cmdbuf_test) + assert.equal(18888, vim.b.cmdbuf_test) end) it("can specific lua prefixed line", function() diff --git a/spec/lua/cmdbuf/handler/lua/variable/buffer_spec.lua b/spec/lua/cmdbuf/handler/lua/variable/buffer_spec.lua index c5fb1ac..5696a35 100644 --- a/spec/lua/cmdbuf/handler/lua/variable/buffer_spec.lua +++ b/spec/lua/cmdbuf/handler/lua/variable/buffer_spec.lua @@ -1,5 +1,6 @@ local helper = require("cmdbuf.test.helper") local cmdbuf = helper.require("cmdbuf") +local assert = require("assertlib").typed(assert) describe("lua/variable/buffer handler", function() before_each(helper.before_each) @@ -20,7 +21,7 @@ describe("lua/variable/buffer handler", function() cmdbuf.execute({ quit = true }) - assert.is_same(8888, vim.b.execute_test) + assert.same(8888, vim.b.execute_test) end) it("adds history on execution", function() @@ -81,7 +82,7 @@ describe("lua/variable/buffer handler", function() helper.execute_as_expr_keymap(cmdbuf.cmdline_expr() .. "1") - assert.equals(18888, vim.b.cmdbuf_test) + assert.equal(18888, vim.b.cmdbuf_test) end) it("can specific lua prefixed line", function() diff --git a/spec/lua/cmdbuf/handler/lua/variable/global_spec.lua b/spec/lua/cmdbuf/handler/lua/variable/global_spec.lua index e3ba886..ca5b233 100644 --- a/spec/lua/cmdbuf/handler/lua/variable/global_spec.lua +++ b/spec/lua/cmdbuf/handler/lua/variable/global_spec.lua @@ -1,5 +1,6 @@ local helper = require("cmdbuf.test.helper") local cmdbuf = helper.require("cmdbuf") +local assert = require("assertlib").typed(assert) describe("lua/variable/global handler", function() before_each(helper.before_each) @@ -20,7 +21,7 @@ describe("lua/variable/global handler", function() cmdbuf.execute({ quit = true }) - assert.is_same(8888, vim.g.execute_test) + assert.same(8888, vim.g.execute_test) end) it("adds history on execution", function() @@ -72,7 +73,7 @@ describe("lua/variable/global handler", function() helper.execute_as_expr_keymap(cmdbuf.cmdline_expr() .. "1") - assert.equals(18888, vim.g.cmdbuf_global_test) + assert.equal(18888, vim.g.cmdbuf_global_test) end) it("can specific lua prefixed line", function() diff --git a/spec/lua/cmdbuf/handler/vim/cmd_spec.lua b/spec/lua/cmdbuf/handler/vim/cmd_spec.lua index 34247e8..73b06a0 100644 --- a/spec/lua/cmdbuf/handler/vim/cmd_spec.lua +++ b/spec/lua/cmdbuf/handler/vim/cmd_spec.lua @@ -1,5 +1,6 @@ local helper = require("cmdbuf.test.helper") local cmdbuf = helper.require("cmdbuf") +local assert = require("assertlib").typed(assert) describe("vim/cmd handler", function() before_each(helper.before_each) @@ -76,6 +77,6 @@ describe("vim/cmd handler", function() helper.execute_as_expr_keymap(cmdbuf.cmdline_expr() .. "1") - assert.equals(18888, vim.g.cmdbuf_test) + assert.equal(18888, vim.g.cmdbuf_test) end) end) diff --git a/spec/lua/cmdbuf/handler/vim/env_spec.lua b/spec/lua/cmdbuf/handler/vim/env_spec.lua index 437dd39..e21de5d 100644 --- a/spec/lua/cmdbuf/handler/vim/env_spec.lua +++ b/spec/lua/cmdbuf/handler/vim/env_spec.lua @@ -1,5 +1,6 @@ local helper = require("cmdbuf.test.helper") local cmdbuf = helper.require("cmdbuf") +local assert = require("assertlib").typed(assert) describe("vim/env handler", function() before_each(function() @@ -49,6 +50,6 @@ describe("vim/env handler", function() helper.execute_as_expr_keymap(cmdbuf.cmdline_expr() .. "") - assert.equals("cmdline", vim.env.CMDBUF_CMDLINE_TEST) + assert.equal("cmdline", vim.env.CMDBUF_CMDLINE_TEST) end) end) diff --git a/spec/lua/cmdbuf/handler/vim/input_spec.lua b/spec/lua/cmdbuf/handler/vim/input_spec.lua index 85e5137..fbe33f1 100644 --- a/spec/lua/cmdbuf/handler/vim/input_spec.lua +++ b/spec/lua/cmdbuf/handler/vim/input_spec.lua @@ -1,5 +1,6 @@ local helper = require("cmdbuf.test.helper") local cmdbuf = helper.require("cmdbuf") +local assert = require("assertlib").typed(assert) describe("vim/input handler", function() before_each(helper.before_each) @@ -46,6 +47,6 @@ describe("vim/input handler", function() helper.execute_as_expr_keymap(cmdbuf.cmdline_expr() .. "let b:cmdbuf_input=1") - assert.equals(1, vim.b.cmdbuf_input) + assert.equal(1, vim.b.cmdbuf_input) end) end) diff --git a/spec/lua/cmdbuf/handler/vim/search/backward_spec.lua b/spec/lua/cmdbuf/handler/vim/search/backward_spec.lua index d2a9de8..0d6a68a 100644 --- a/spec/lua/cmdbuf/handler/vim/search/backward_spec.lua +++ b/spec/lua/cmdbuf/handler/vim/search/backward_spec.lua @@ -1,5 +1,6 @@ local helper = require("cmdbuf.test.helper") local cmdbuf = helper.require("cmdbuf") +local assert = require("assertlib").typed(assert) describe("vim/search/backward handler", function() before_each(helper.before_each) @@ -22,9 +23,9 @@ describe("vim/search/backward handler", function() cmdbuf.execute({ quit = true }) assert.cursor_word("target") - assert.equals("target", vim.fn.getreg("/")) - assert.equals(1, vim.v.hlsearch) - assert.equals(0, vim.v.searchforward) + assert.equal("target", vim.fn.getreg("/")) + assert.equal(1, vim.v.hlsearch) + assert.equal(0, vim.v.searchforward) end) it("adds history on execution", function() diff --git a/spec/lua/cmdbuf/handler/vim/search/forward_spec.lua b/spec/lua/cmdbuf/handler/vim/search/forward_spec.lua index 9c7d45d..03d2895 100644 --- a/spec/lua/cmdbuf/handler/vim/search/forward_spec.lua +++ b/spec/lua/cmdbuf/handler/vim/search/forward_spec.lua @@ -1,5 +1,6 @@ local helper = require("cmdbuf.test.helper") local cmdbuf = helper.require("cmdbuf") +local assert = require("assertlib").typed(assert) describe("vim/search/forward handler", function() before_each(helper.before_each) @@ -22,9 +23,9 @@ describe("vim/search/forward handler", function() cmdbuf.execute({ quit = true }) assert.cursor_word("target") - assert.equals("target", vim.fn.getreg("/")) - assert.equals(1, vim.v.hlsearch) - assert.equals(1, vim.v.searchforward) + assert.equal("target", vim.fn.getreg("/")) + assert.equal(1, vim.v.hlsearch) + assert.equal(1, vim.v.searchforward) end) it("adds history on execution", function() diff --git a/spec/lua/cmdbuf/init_spec.lua b/spec/lua/cmdbuf/init_spec.lua index f637931..c0b8a09 100644 --- a/spec/lua/cmdbuf/init_spec.lua +++ b/spec/lua/cmdbuf/init_spec.lua @@ -1,5 +1,6 @@ local helper = require("cmdbuf.test.helper") local cmdbuf = helper.require("cmdbuf") +local assert = require("assertlib").typed(assert) describe("cmdbuf.nvim", function() before_each(helper.before_each) @@ -128,7 +129,7 @@ history2]]) cmdbuf.open() - assert.is_same("fired_cmdbuf_new!", vim.b.cmdbuf_test) + assert.same("fired_cmdbuf_new!", vim.b.cmdbuf_test) end) it("can restore the buffer even if it was closed by :quit!", function() @@ -274,7 +275,7 @@ history2]]) local got = cmdbuf.get_context() - assert.is_same(got, { + assert.same(got, { type = "vim/cmd", }) end) @@ -286,7 +287,7 @@ history2]]) local got = cmdbuf.get_context({ bufnr = bufnr }) - assert.is_same(got, { + assert.same(got, { type = "vim/cmd", }) end)