File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -290,4 +290,23 @@ function TestCO:testAppsWithEmptyGithubSubdirectory() -- luacheck: ignore 212
290
290
lu .assertEquals (githubResult , {})
291
291
end
292
292
293
+ function TestCO :testAppsWithGithubSubdirectoryOwner () -- luacheck: ignore 212
294
+ -- Test /apps/ with /apps/github having different owner
295
+ self .FS .openCodeownersFileAsLines = function ()
296
+ local lines = {
297
+ " /apps/ @octocat" ,
298
+ " /apps/github @doctocat"
299
+ }
300
+ local i = 0
301
+ return function ()
302
+ i = i + 1
303
+ return lines [i ]
304
+ end
305
+ end
306
+
307
+ -- Files in /apps/github should have @doctocat (overrides /apps/)
308
+ local githubResult = CO .matchFilesToCodeowner ({" /apps/github/readme.md" })
309
+ lu .assertEquals (githubResult , {" @doctocat" })
310
+ end
311
+
293
312
os.exit (lu .LuaUnit .run ())
You can’t perform that action at this time.
0 commit comments