diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2015-08-18 21:57:32 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-08-18 21:57:32 -0400 |
commit | 8653000782bc9ab06d865ca96c89ec586ede6411 (patch) | |
tree | 6460bc78a146d8a8a130cd5338486fea2a4b44f4 /test | |
parent | 681ee8131c1997e5ad5c72a39268c6793c6b1180 (diff) | |
parent | 8f09fa1a49ffa1fc00eabf78c54908d515d0aaa5 (diff) | |
download | rneovim-8653000782bc9ab06d865ca96c89ec586ede6411.tar.gz rneovim-8653000782bc9ab06d865ca96c89ec586ede6411.tar.bz2 rneovim-8653000782bc9ab06d865ca96c89ec586ede6411.zip |
Merge pull request #3184 from justinmk/remove_is_readonly
os/fs.c: remove os_file_is_readonly()
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/os/fs_spec.lua | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/test/unit/os/fs_spec.lua b/test/unit/os/fs_spec.lua index 9cca3ca244..28e831229f 100644 --- a/test/unit/os/fs_spec.lua +++ b/test/unit/os/fs_spec.lua @@ -229,10 +229,6 @@ describe('fs function', function() return res end - local function os_file_is_readonly(filename) - return fs.os_file_is_readonly((to_cstr(filename))) - end - local function os_file_is_readable(filename) return fs.os_file_is_readable((to_cstr(filename))) end @@ -314,10 +310,8 @@ describe('fs function', function() end) end - -- On Windows `os_fchown` always returns 0 - -- because `uv_fs_chown` is no-op on this platform. if (ffi.os == 'Windows' or ffi.C.geteuid() == 0) then - pending('skipped (os_fchown is no-op on Windows)', function() end) + pending('skipped (uv_fs_chown is no-op on Windows)', function() end) else it('returns nonzero if process has not enough permissions', function() -- chown to root @@ -326,22 +320,6 @@ describe('fs function', function() end end) - describe('os_file_is_readonly', function() - it('returns true if the file is readonly', function() - local perm = os_getperm('unit-test-directory/test.file') - local perm_orig = perm - perm = unset_bit(perm, ffi.C.kS_IWUSR) - perm = unset_bit(perm, ffi.C.kS_IWGRP) - perm = unset_bit(perm, ffi.C.kS_IWOTH) - eq(OK, (os_setperm('unit-test-directory/test.file', perm))) - eq(true, os_file_is_readonly('unit-test-directory/test.file')) - eq(OK, (os_setperm('unit-test-directory/test.file', perm_orig))) - end) - - it('returns false if the file is writable', function() - eq(false, os_file_is_readonly('unit-test-directory/test.file')) - end) - end) describe('os_file_is_readable', function() it('returns false if the file is not readable', function() |