aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-03-24 11:21:20 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-03-24 14:17:40 +0100
commit998a16c926623a667ecb0228f4a6cd8ba1e90201 (patch)
tree00abaed092dd47e6e312a00f549ab62a4ded3a43 /test
parent84a25770ac4b1c18f0e6bd1e17bdda7eb3c6afa0 (diff)
downloadrneovim-998a16c926623a667ecb0228f4a6cd8ba1e90201.tar.gz
rneovim-998a16c926623a667ecb0228f4a6cd8ba1e90201.tar.bz2
rneovim-998a16c926623a667ecb0228f4a6cd8ba1e90201.zip
refactor/rename: path_is_absolute()
Diffstat (limited to 'test')
-rw-r--r--test/unit/os/fs_spec.lua2
-rw-r--r--test/unit/path_spec.lua12
2 files changed, 7 insertions, 7 deletions
diff --git a/test/unit/os/fs_spec.lua b/test/unit/os/fs_spec.lua
index bc39507c08..78455ee324 100644
--- a/test/unit/os/fs_spec.lua
+++ b/test/unit/os/fs_spec.lua
@@ -199,7 +199,7 @@ describe('fs.c', function()
itp('returns the absolute path when given an executable inside $PATH', function()
local fullpath = exe('ls')
- eq(1, fs.path_is_absolute_path(to_cstr(fullpath)))
+ eq(1, fs.path_is_absolute(to_cstr(fullpath)))
end)
itp('returns the absolute path when given an executable relative to the current dir', function()
diff --git a/test/unit/path_spec.lua b/test/unit/path_spec.lua
index ed597eaed7..1bd20b1da9 100644
--- a/test/unit/path_spec.lua
+++ b/test/unit/path_spec.lua
@@ -585,22 +585,22 @@ describe('path.c', function()
end)
end)
- describe('path_is_absolute_path', function()
- local function path_is_absolute_path(filename)
+ describe('path_is_absolute', function()
+ local function path_is_absolute(filename)
filename = to_cstr(filename)
- return cimp.path_is_absolute_path(filename)
+ return cimp.path_is_absolute(filename)
end
itp('returns true if filename starts with a slash', function()
- eq(OK, path_is_absolute_path('/some/directory/'))
+ eq(OK, path_is_absolute('/some/directory/'))
end)
itp('returns true if filename starts with a tilde', function()
- eq(OK, path_is_absolute_path('~/in/my/home~/directory'))
+ eq(OK, path_is_absolute('~/in/my/home~/directory'))
end)
itp('returns false if filename starts not with slash nor tilde', function()
- eq(FAIL, path_is_absolute_path('not/in/my/home~/directory'))
+ eq(FAIL, path_is_absolute('not/in/my/home~/directory'))
end)
end)
end)