90
90
describe (' trim_common_root' , function ()
91
91
it (' trims the common root when all files share the same root with the shortest one' , function ()
92
92
local result = fs_utils .trim_common_root ({
93
- ' foo/bar/baz.org' ,
94
- ' foo/bar/baz/bar.org' ,
95
- ' foo/bar/baz3.org' ,
93
+ ' / foo/bar/baz.org' ,
94
+ ' / foo/bar/baz/bar.org' ,
95
+ ' / foo/bar/baz3.org' ,
96
96
})
97
97
assert .are .same ({
98
98
' baz.org' ,
@@ -103,11 +103,11 @@ describe('trim_common_root', function()
103
103
104
104
it (' trims the common root when there are multiple different roots' , function ()
105
105
local result = fs_utils .trim_common_root ({
106
- ' foo/bar/tea/notes.org' ,
107
- ' foo/bar/tea/todos.org' ,
108
- ' foo/bar/baz/work.org' ,
109
- ' foo/bar/baz/personal.org' ,
110
- ' foo/bar/baz/project.org' ,
106
+ ' / foo/bar/tea/notes.org' ,
107
+ ' / foo/bar/tea/todos.org' ,
108
+ ' / foo/bar/baz/work.org' ,
109
+ ' / foo/bar/baz/personal.org' ,
110
+ ' / foo/bar/baz/project.org' ,
111
111
})
112
112
113
113
assert .are .same ({
@@ -121,11 +121,11 @@ describe('trim_common_root', function()
121
121
122
122
it (' returns paths as they are if they do not share the common root' , function ()
123
123
local result = fs_utils .trim_common_root ({
124
- ' foo/bar/tea/notes.org' ,
125
- ' foo/bar/tea/todos.org' ,
126
- ' foo/bar/baz/work.org' ,
127
- ' foo/bar/baz/personal.org' ,
128
- ' other/bar/baz/project.org' ,
124
+ ' / foo/bar/tea/notes.org' ,
125
+ ' / foo/bar/tea/todos.org' ,
126
+ ' / foo/bar/baz/work.org' ,
127
+ ' / foo/bar/baz/personal.org' ,
128
+ ' / other/bar/baz/project.org' ,
129
129
})
130
130
131
131
assert .are .same ({
0 commit comments