robin/laufey

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

Justin M. KeyesMerge #40865 from justinmk/fixcif907614088

master
721 B25 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 eq = t.eq
6local clear = n.clear
7local command = n.command
8
9describe('env', function()
10  before_each(function()
11    clear()
12  end)
13
14  it('vim.uv.os_setenv(), vim.uv.os_unsetenv() consistency #32550', function()
15    eq('', n.eval('$FOO'))
16    command('lua vim.uv.os_setenv("FOO", "bar")')
17    eq('bar', n.eval('$FOO'))
18    command('lua vim.uv.os_setenv("FOO", "fizz")')
19    eq('fizz', n.eval('$FOO'))
20    command('lua vim.uv.os_unsetenv("FOO")')
21    eq('', n.eval('$FOO'))
22    command('lua vim.uv.os_setenv("FOO", "buzz")')
23    eq('buzz', n.eval('$FOO'))
24  end)
25end)