diff options
| author | William Boman <william@redwill.se> | 2022-05-19 14:03:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-19 14:03:57 +0200 |
| commit | 84c07269f66c6d3ba13cab3b8d8d1e58a91f2589 (patch) | |
| tree | 29f4d72931d0abf7acf1456dd46dcad35a87070b /tests | |
| parent | fix(erlangls): follow git tags (#708) (diff) | |
| download | mason-84c07269f66c6d3ba13cab3b8d8d1e58a91f2589.tar mason-84c07269f66c6d3ba13cab3b8d8d1e58a91f2589.tar.gz mason-84c07269f66c6d3ba13cab3b8d8d1e58a91f2589.tar.bz2 mason-84c07269f66c6d3ba13cab3b8d8d1e58a91f2589.tar.lz mason-84c07269f66c6d3ba13cab3b8d8d1e58a91f2589.tar.xz mason-84c07269f66c6d3ba13cab3b8d8d1e58a91f2589.tar.zst mason-84c07269f66c6d3ba13cab3b8d8d1e58a91f2589.zip | |
feat(lspinfo): check that .setup() has been called to consider cmd executable (#710)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/core/functional/list_spec.lua | 10 | ||||
| -rw-r--r-- | tests/core/functional/logic_spec.lua | 5 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/core/functional/list_spec.lua b/tests/core/functional/list_spec.lua index c553a7d0..7fa644f2 100644 --- a/tests/core/functional/list_spec.lua +++ b/tests/core/functional/list_spec.lua @@ -84,4 +84,14 @@ describe("functional: list", function() assert.spy(iterate_fn).was_called_with("YELLOW", 2) assert.spy(iterate_fn).was_called_with("RED", 3) end) + + it("should concat list tables", function() + local list = { "monstera", "tulipa", "carnation" } + assert.same({ "monstera", "tulipa", "carnation", "rose", "daisy" }, _.concat(list, { "rose", "daisy" })) + assert.same({ "monstera", "tulipa", "carnation" }, list) -- does not mutate list + end) + + it("should concat strings", function() + assert.equals("FooBar", _.concat("Foo", "Bar")) + end) end) diff --git a/tests/core/functional/logic_spec.lua b/tests/core/functional/logic_spec.lua index 19ac8bb7..291d8979 100644 --- a/tests/core/functional/logic_spec.lua +++ b/tests/core/functional/logic_spec.lua @@ -41,4 +41,9 @@ describe("functional: logic", function() assert.equals("Hello World!", planetary_object "World!") assert.equals("to the Moon!", planetary_object "Moon!") end) + + it("should give complements", function() + assert.is_true(_.complement(_.is_nil, "not nil")) + assert.is_false(_.complement(_.is_nil, nil)) + end) end) |
