robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
f907614088
master
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 () 10before_each ( function () 11clear () 12end ) 13 14it ( 'vim.uv.os_setenv(), vim.uv.os_unsetenv() consistency #32550' , function () 15eq ( '' , n . eval ( '$FOO' )) 16command ( 'lua vim.uv.os_setenv("FOO", "bar")' ) 17eq ( 'bar' , n . eval ( '$FOO' )) 18command ( 'lua vim.uv.os_setenv("FOO", "fizz")' ) 19eq ( 'fizz' , n . eval ( '$FOO' )) 20command ( 'lua vim.uv.os_unsetenv("FOO")' ) 21eq ( '' , n . eval ( '$FOO' )) 22command ( 'lua vim.uv.os_setenv("FOO", "buzz")' ) 23eq ( 'buzz' , n . eval ( '$FOO' )) 24end ) 25end )