aboutsummaryrefslogtreecommitdiff
path: root/test/unit/optionstr_spec.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2025-01-10 10:20:43 +0000
committerLewis Russell <me@lewisr.dev>2025-01-13 16:58:25 +0000
commit34e2185022ab698827b72751d77e218a1b6b6afe (patch)
tree9b8c0fe0a24b77a60e1e6511cfb3e2135b7789af /test/unit/optionstr_spec.lua
parentcb7b4e296238b46025de05203c886d67da401728 (diff)
downloadrneovim-34e2185022ab698827b72751d77e218a1b6b6afe.tar.gz
rneovim-34e2185022ab698827b72751d77e218a1b6b6afe.tar.bz2
rneovim-34e2185022ab698827b72751d77e218a1b6b6afe.zip
fix(options): better handling of empty values
Problem: Whether an option is allowed to be empty isn't well defined and isn't properly checked. Solution: - For non-list string options, explicitly check the option value if it is empty. - Annotate non-list string options that can accept an empty value. - Adjust command completion to ignore the empty value. - Render values in Lua meta files
Diffstat (limited to 'test/unit/optionstr_spec.lua')
-rw-r--r--test/unit/optionstr_spec.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/optionstr_spec.lua b/test/unit/optionstr_spec.lua
index b9c9ceaa85..1f5b42485f 100644
--- a/test/unit/optionstr_spec.lua
+++ b/test/unit/optionstr_spec.lua
@@ -11,8 +11,8 @@ local check_ff_value = function(ff)
end
describe('check_ff_value', function()
- itp('views empty string as valid', function()
- eq(1, check_ff_value(''))
+ itp('views empty string as invalid', function()
+ eq(0, check_ff_value(''))
end)
itp('views "unix", "dos" and "mac" as valid', function()