local common = require("lua-tests.neopyter.common")

describe("common", function()
    it("load buffer", function()
        local buf = common.load_buffer("foo")
        assert.is_equal("python", vim.bo[buf].filetype)
        assert.is_equal("foo", common.get_buf_conent(buf))
    end)
    it("multiple lines", function()
        local buf = common.load_buffer("foo\nbar")
        assert.is_equal("python", vim.bo[buf].filetype)
        assert.is_equal("foo\nbar", common.get_buf_conent(buf))
    end)
    it("multiple line list", function()
        local buf = common.load_buffer({ "foo", "bar" })
        assert.is_equal("python", vim.bo[buf].filetype)
        assert.is_equal("foo\nbar", common.get_buf_conent(buf))
    end)
    it("empty file", function()
        local buf = common.load_buffer("")
        assert.is_equal("", common.get_buf_conent(buf))
    end)
end)
