summaryrefslogtreecommitdiff
path: root/lua/tests
diff options
context:
space:
mode:
authorLuke Kershaw <35707277+l-kershaw@users.noreply.github.com>2021-07-02 07:50:55 +0100
committerGitHub <noreply@github.com>2021-07-02 08:50:55 +0200
commit50001d4965af3c95614b1423ab6d130068319cd9 (patch)
tree9120d114b4713259ba9ab10a70261a98fe9c0b3f /lua/tests
parent5a53ec5c2fdab10ca8775d3979b1a85e63d57953 (diff)
fix: table number option extend (#947)
* fix: prevent error when overriding tables with numbers Fixes #944 - refactor `config.smarter_depth_2_extend` - use `config.smarter_depth_2_extend` for setting `layout_config` in `Picker:new` * test: check that can override a table with a number for layout configuration
Diffstat (limited to 'lua/tests')
-rw-r--r--lua/tests/automated/layout_strategies_spec.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/lua/tests/automated/layout_strategies_spec.lua b/lua/tests/automated/layout_strategies_spec.lua
index a4d2c50..f8f8b02 100644
--- a/lua/tests/automated/layout_strategies_spec.lua
+++ b/lua/tests/automated/layout_strategies_spec.lua
@@ -89,4 +89,14 @@ describe('layout_strategies', function()
{horizontal={height=50}}, {horizontal={height=100}}, {height=120}
)
+ test_defaults_key("should handle user config overriding a table with a number",
+ 'height','horizontal',120,
+ {height={padding=5}},{height=120},{}
+ )
+
+ test_defaults_key("should handle user oneshot overriding a table with a number",
+ 'height','horizontal',120,
+ {},{height={padding=5}},{height=120}
+ )
+
end)