aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEllison Leão <ellisonleao@gmail.com>2023-09-29 18:27:57 -0300
committerEllison Leão <ellisonleao@gmail.com>2023-09-29 18:27:57 -0300
commite7b755d869296c0e100add9c940fb3024a41aa8a (patch)
tree3517d71cea1a13c28a82729c311466e98219858b /tests
parent65f2b9e3b554c4579129e393d76044068ab34eed (diff)
downloadgruvbox-e7b755d869296c0e100add9c940fb3024a41aa8a.tar.gz
gruvbox-e7b755d869296c0e100add9c940fb3024a41aa8a.tar.xz
BREAKING CHANGE: gruvbox is now a single module
palette: Can now be accessed in the main module through `require('gruvbox').palette` get_base_colors: now a internal function called get_colors. If you want to get the colors, just get the palette directly groups: now moved to main module
Diffstat (limited to 'tests')
-rw-r--r--tests/gruvbox/gruvbox_spec.lua15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/gruvbox/gruvbox_spec.lua b/tests/gruvbox/gruvbox_spec.lua
index 387a034..e4db89f 100644
--- a/tests/gruvbox/gruvbox_spec.lua
+++ b/tests/gruvbox/gruvbox_spec.lua
@@ -137,10 +137,8 @@ describe("tests", function()
it("does not set terminal colors when terminal_colors is false", function()
clear_term_colors()
- print("vim.g color before =>", vim.g.terminal_color_0, type(vim.g.terminal_color_0))
gruvbox.setup({ terminal_colors = false })
gruvbox.load()
- print("vim.g color after =>", vim.g.terminal_color_0, type(vim.g.terminal_color_0))
assert.is_nil(vim.g.terminal_color_0)
end)
@@ -148,7 +146,16 @@ describe("tests", function()
clear_term_colors()
gruvbox.setup({ terminal_colors = true })
gruvbox.load()
- local colors = require("gruvbox.palette").get_base_colors({}, "dark", "")
- assert.are.same(vim.g.terminal_color_0, colors.bg0)
+
+ -- dark bg
+ local colors = require("gruvbox").palette
+ vim.opt.background = "dark"
+ assert.are.same(vim.g.terminal_color_0, colors.dark0)
+
+ -- light bg
+ clear_term_colors()
+ gruvbox.load()
+ vim.opt.background = "light"
+ assert.are.same(vim.g.terminal_color_0, colors.light0)
end)
end)