mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
fileid: rename os_get_file_id
This commit is contained in:
@@ -646,16 +646,16 @@ describe('fs function', function()
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('os_get_file_id', function()
|
||||
describe('os_fileid', function()
|
||||
it('returns false if given an non-existing file', function()
|
||||
local file_id = file_id_new()
|
||||
assert.is_false((fs.os_get_file_id('/non-existent', file_id)))
|
||||
assert.is_false((fs.os_fileid('/non-existent', file_id)))
|
||||
end)
|
||||
|
||||
it('returns true if given an existing file and fills file_id', function()
|
||||
local file_id = file_id_new()
|
||||
local path = 'unit-test-directory/test.file'
|
||||
assert.is_true((fs.os_get_file_id(path, file_id)))
|
||||
assert.is_true((fs.os_fileid(path, file_id)))
|
||||
assert.is_true(0 < file_id[0].inode)
|
||||
assert.is_true(0 < file_id[0].device_id)
|
||||
end)
|
||||
@@ -665,7 +665,7 @@ describe('fs function', function()
|
||||
it('returns true if two FileIDs are equal', function()
|
||||
local file_id = file_id_new()
|
||||
local path = 'unit-test-directory/test.file'
|
||||
assert.is_true((fs.os_get_file_id(path, file_id)))
|
||||
assert.is_true((fs.os_fileid(path, file_id)))
|
||||
assert.is_true((fs.os_file_id_equal(file_id, file_id)))
|
||||
end)
|
||||
|
||||
@@ -674,8 +674,8 @@ describe('fs function', function()
|
||||
local file_id_2 = file_id_new()
|
||||
local path_1 = 'unit-test-directory/test.file'
|
||||
local path_2 = 'unit-test-directory/test_2.file'
|
||||
assert.is_true((fs.os_get_file_id(path_1, file_id_1)))
|
||||
assert.is_true((fs.os_get_file_id(path_2, file_id_2)))
|
||||
assert.is_true((fs.os_fileid(path_1, file_id_1)))
|
||||
assert.is_true((fs.os_fileid(path_2, file_id_2)))
|
||||
assert.is_false((fs.os_file_id_equal(file_id_1, file_id_2)))
|
||||
end)
|
||||
end)
|
||||
@@ -685,7 +685,7 @@ describe('fs function', function()
|
||||
local file_id = file_id_new()
|
||||
local file_info = file_info_new()
|
||||
local path = 'unit-test-directory/test.file'
|
||||
assert.is_true((fs.os_get_file_id(path, file_id)))
|
||||
assert.is_true((fs.os_fileid(path, file_id)))
|
||||
assert.is_true((fs.os_fileinfo(path, file_info)))
|
||||
assert.is_true((fs.os_file_id_equal_file_info(file_id, file_info)))
|
||||
end)
|
||||
@@ -695,7 +695,7 @@ describe('fs function', function()
|
||||
local file_info = file_info_new()
|
||||
local path_1 = 'unit-test-directory/test.file'
|
||||
local path_2 = 'unit-test-directory/test_2.file'
|
||||
assert.is_true((fs.os_get_file_id(path_1, file_id)))
|
||||
assert.is_true((fs.os_fileid(path_1, file_id)))
|
||||
assert.is_true((fs.os_fileinfo(path_2, file_info)))
|
||||
assert.is_false((fs.os_file_id_equal_file_info(file_id, file_info)))
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user