From dd25b2e5aebd43badc346d3cd3d06cdc01a42c9b Mon Sep 17 00:00:00 2001 From: Nicolas Hillegeer Date: Fri, 16 Jan 2015 21:41:33 +0100 Subject: [PATCH] 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 --- test/unit/os/fs_spec.lua | 4 ++-- 1 file 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()