2024-04-20 08:44:13 -07:00
|
|
|
local t = require('test.testutil')
|
|
|
|
local n = require('test.functional.testnvim')()
|
|
|
|
|
|
|
|
local clear = n.clear
|
2024-04-08 02:03:20 -07:00
|
|
|
local eq = t.eq
|
2024-04-20 08:44:13 -07:00
|
|
|
local api = n.api
|
2024-03-21 04:23:22 -07:00
|
|
|
|
|
|
|
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)
|