aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorThomas Wienecke <wienecke.t@gmail.com>2014-03-30 01:57:46 +0100
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-03 10:32:41 -0300
commit6d712defa52e58627aca5c875677d14d705300e8 (patch)
tree69516dc311b87cc7840f05d0a88259fe2094a465 /test
parent81237af70e7ac2d2277f428da87ca5fa7b16c8e1 (diff)
downloadrneovim-6d712defa52e58627aca5c875677d14d705300e8.tar.gz
rneovim-6d712defa52e58627aca5c875677d14d705300e8.tar.bz2
rneovim-6d712defa52e58627aca5c875677d14d705300e8.zip
Refactor fullpathcmp -> path_full_compare.
Diffstat (limited to 'test')
-rw-r--r--test/unit/path.moon22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/unit/path.moon b/test/unit/path.moon
index 90142a8cbb..b989283c1d 100644
--- a/test/unit/path.moon
+++ b/test/unit/path.moon
@@ -6,19 +6,19 @@ ffi.cdef [[
typedef enum file_comparison {
FPC_SAME = 1, FPC_DIFF = 2, FPC_NOTX = 4, FPC_DIFFX = 6, FPC_SAMEX = 7
} FileComparison;
-FileComparison fullpathcmp(char_u *s1, char_u *s2, int checkname);
+FileComparison path_full_compare(char_u *s1, char_u *s2, int checkname);
]]
-- import constants parsed by ffi
{:FPC_SAME, :FPC_DIFF, :FPC_NOTX, :FPC_DIFFX, :FPC_SAMEX} = path
describe 'path function', ->
- describe 'fullpathcmp', ->
+ describe 'path_full_compare', ->
- fullpathcmp = (s1, s2, cn) ->
+ path_full_compare = (s1, s2, cn) ->
s1 = to_cstr s1
s2 = to_cstr s2
- path.fullpathcmp s1, s2, cn or 0
+ path.path_full_compare s1, s2, cn or 0
f1 = 'f1.o'
f2 = 'f2.o'
@@ -33,19 +33,19 @@ describe 'path function', ->
os.remove f2
it 'returns FPC_SAME when passed the same file', ->
- eq FPC_SAME, (fullpathcmp f1, f1)
+ eq FPC_SAME, (path_full_compare f1, f1)
it 'returns FPC_SAMEX when files that dont exist and have same name', ->
- eq FPC_SAMEX, (fullpathcmp 'null.txt', 'null.txt', true)
+ eq FPC_SAMEX, (path_full_compare 'null.txt', 'null.txt', true)
it 'returns FPC_NOTX when files that dont exist', ->
- eq FPC_NOTX, (fullpathcmp 'null.txt', 'null.txt')
+ eq FPC_NOTX, (path_full_compare 'null.txt', 'null.txt')
it 'returns FPC_DIFF when passed different files', ->
- eq FPC_DIFF, (fullpathcmp f1, f2)
- eq FPC_DIFF, (fullpathcmp f2, f1)
+ eq FPC_DIFF, (path_full_compare f1, f2)
+ eq FPC_DIFF, (path_full_compare f2, f1)
it 'returns FPC_DIFFX if only one does not exist', ->
- eq FPC_DIFFX, (fullpathcmp f1, 'null.txt')
- eq FPC_DIFFX, (fullpathcmp 'null.txt', f1)
+ eq FPC_DIFFX, (path_full_compare f1, 'null.txt')
+ eq FPC_DIFFX, (path_full_compare 'null.txt', f1)