aboutsummaryrefslogtreecommitdiff
path: root/test/unit/tempfile_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-03-11 22:23:14 +0800
committerGitHub <noreply@github.com>2024-03-11 22:23:14 +0800
commit1da0f3494eb042c84ae5f00654878f7f8cedf3b7 (patch)
tree6f0ffb0220113945b77308c01842446d1f12fcc2 /test/unit/tempfile_spec.lua
parent0f20b7d803779950492c2838e2b042a38f4ee22f (diff)
downloadrneovim-1da0f3494eb042c84ae5f00654878f7f8cedf3b7.tar.gz
rneovim-1da0f3494eb042c84ae5f00654878f7f8cedf3b7.tar.bz2
rneovim-1da0f3494eb042c84ae5f00654878f7f8cedf3b7.zip
test: correct order of arguments to eq() (#27816)
Diffstat (limited to 'test/unit/tempfile_spec.lua')
-rw-r--r--test/unit/tempfile_spec.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/tempfile_spec.lua b/test/unit/tempfile_spec.lua
index e35490a561..bb0e56d640 100644
--- a/test/unit/tempfile_spec.lua
+++ b/test/unit/tempfile_spec.lua
@@ -28,7 +28,7 @@ describe('tempfile related functions', function()
assert.True(dir ~= nil and dir:len() > 0)
-- os_file_is_writable returns 2 for a directory which we have rights
-- to write into.
- eq(lib.os_file_is_writable(helpers.to_cstr(dir)), 2)
+ eq(2, lib.os_file_is_writable(helpers.to_cstr(dir)))
for entry in vim.fs.dir(dir) do
assert.True(entry == '.' or entry == '..')
end
@@ -57,7 +57,7 @@ describe('tempfile related functions', function()
itp('generate file name in Nvim own temp directory', function()
local dir = vim_gettempdir()
local file = vim_tempname()
- eq(string.sub(file, 1, string.len(dir)), dir)
+ eq(dir, string.sub(file, 1, string.len(dir)))
end)
end)
end)