robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

Justin M. KeyesMerge #40865 from justinmk/fixcif907614088

master
608 B21 linesraw
1local t = require('test.testutil')
2local n = require('test.functional.testnvim')()
3
4local describe, it, before_each = t.describe, t.it, t.before_each
5local clear = n.clear
6local eq = t.eq
7local api = n.api
8
9describe("'modified'", function()
10  before_each(function()
11    clear()
12  end)
13
14  it("can be unset after changing 'fileformat'", function()
15    for _, ff in ipairs({ 'unix', 'dos', 'mac' }) do
16      api.nvim_set_option_value('fileformat', ff, {})
17      api.nvim_set_option_value('modified', false, {})
18      eq(false, api.nvim_get_option_value('modified', {}), 'fileformat=' .. ff)
19    end
20  end)
21end)