aboutsummaryrefslogtreecommitdiff
path: root/test/unit/os/fs_spec.lua
diff options
context:
space:
mode:
authorNicolas Hillegeer <nicolas@hillegeer.com>2015-01-16 21:41:33 +0100
committerNicolas Hillegeer <nicolas@hillegeer.com>2015-01-16 21:44:25 +0100
commitdd25b2e5aebd43badc346d3cd3d06cdc01a42c9b (patch)
tree7ad9a4df8f5f8d61b52ed8a663bb260043d234eb /test/unit/os/fs_spec.lua
parent401d738597a3e25319f988af49ec1cd7a5cb0980 (diff)
downloadrneovim-dd25b2e5aebd43badc346d3cd3d06cdc01a42c9b.tar.gz
rneovim-dd25b2e5aebd43badc346d3cd3d06cdc01a42c9b.tar.bz2
rneovim-dd25b2e5aebd43badc346d3cd3d06cdc01a42c9b.zip
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
Diffstat (limited to 'test/unit/os/fs_spec.lua')
-rw-r--r--test/unit/os/fs_spec.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/os/fs_spec.lua b/test/unit/os/fs_spec.lua
index 2d54dc6003..90f5a0b7de 100644
--- a/test/unit/os/fs_spec.lua
+++ b/test/unit/os/fs_spec.lua
@@ -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()