9090describe (' trim_common_root' , function ()
9191 it (' trims the common root when all files share the same root with the shortest one' , function ()
9292 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' ,
9696 })
9797 assert .are .same ({
9898 ' baz.org' ,
@@ -103,11 +103,11 @@ describe('trim_common_root', function()
103103
104104 it (' trims the common root when there are multiple different roots' , function ()
105105 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' ,
111111 })
112112
113113 assert .are .same ({
@@ -121,11 +121,11 @@ describe('trim_common_root', function()
121121
122122 it (' returns paths as they are if they do not share the common root' , function ()
123123 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' ,
129129 })
130130
131131 assert .are .same ({
0 commit comments