mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
test/os/fs: fix call to lfs.attributes
The second argument to lfs.attributes() serves only to select a specific part of the normally returned table. It's not a file open flag (e.g.: as for fopen() in C). Also made the (n)eq checks a bit more idiomatic. Fixes #1831
This commit is contained in:
parent
401d738597
commit
dd25b2e5ae
@ -33,11 +33,11 @@ local absolute_executable = nil
|
||||
local executable_name = nil
|
||||
|
||||
local function assert_file_exists(filepath)
|
||||
eq(false, nil == (lfs.attributes(filepath, 'r')))
|
||||
neq(nil, lfs.attributes(filepath))
|
||||
end
|
||||
|
||||
local function assert_file_does_not_exist(filepath)
|
||||
eq(true, nil == (lfs.attributes(filepath, 'r')))
|
||||
eq(nil, lfs.attributes(filepath))
|
||||
end
|
||||
|
||||
describe('fs function', function()
|
||||
|
Loading…
Reference in New Issue
Block a user