aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFamiu Haque <famiuhaque@proton.me>2024-03-21 17:23:22 +0600
committerFamiu Haque <famiuhaque@proton.me>2024-03-21 19:40:13 +0600
commit58cc66ee1f066127c33157b91c64d9b125a96621 (patch)
tree265e9464d4337ec3b314f0237969b1d7909eba34
parent2214f9c19daa46a1fc37bcc14c017c092894a506 (diff)
downloadrneovim-58cc66ee1f066127c33157b91c64d9b125a96621.tar.gz
rneovim-58cc66ee1f066127c33157b91c64d9b125a96621.tar.bz2
rneovim-58cc66ee1f066127c33157b91c64d9b125a96621.zip
test(options): add test for `'modified'`
-rw-r--r--test/functional/options/modified_spec.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/functional/options/modified_spec.lua b/test/functional/options/modified_spec.lua
new file mode 100644
index 0000000000..4fb80c255d
--- /dev/null
+++ b/test/functional/options/modified_spec.lua
@@ -0,0 +1,18 @@
+local helpers = require('test.functional.helpers')(after_each)
+local clear = helpers.clear
+local eq = helpers.eq
+local api = helpers.api
+
+describe("'modified'", function()
+ before_each(function()
+ clear()
+ end)
+
+ it("can be unset after changing 'fileformat'", function()
+ for _, ff in ipairs({ 'unix', 'dos', 'mac' }) do
+ api.nvim_set_option_value('fileformat', ff, {})
+ api.nvim_set_option_value('modified', false, {})
+ eq(false, api.nvim_get_option_value('modified', {}), 'fileformat=' .. ff)
+ end
+ end)
+end)