Skip to content

Commit

Permalink
add CODEOWNERS matcher tests for "/" and file names with spaces (#5090)
Browse files Browse the repository at this point in the history
  • Loading branch information
Konrad Jamrozik authored Jan 11, 2023
1 parent 54ce2ed commit cdcd619
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,20 @@ public class CodeOwnersFileTests
// @formatter:off
// Path: Expected match:
// Codeowners , Target , Legacy , New
new( "/" , "a" , true , true ),
new( "/" , "A" , true , true ),
new( "/" , "/a" , true , true ),
new( "/" , "a/" , true , true ),
new( "/" , "/a/" , true , true ),
new( "/" , "/a/b" , true , true ),
new( "/a" , "a" , true , true ),
new( "/a" , "A" , true , false ),
new( "/a" , "/a" , true , true ),
new( "/a" , "a/" , true , false ),
new( "/a" , "/a/" , true , false ),
new( "/a" , "/a/b" , true , false ),
new( "/a" , "/a/b/" , true , false ),
new( "/a" , "/a\\ b" , true , false ),
new( "/a" , "/x/a/b" , false , false ),
new( "a" , "a" , true , true ),
new( "a" , "A" , true , false ),
Expand All @@ -47,6 +54,7 @@ public class CodeOwnersFileTests
new( "/a/" , "a/" , true , true ),
new( "/a/" , "/a/" , true , true ),
new( "/a/" , "/a/b" , true , true ),
new( "/a/" , "/a\\ b" , true , true ),
new( "/a/" , "/a/b/" , true , true ),
new( "/a/" , "/A/b/" , true , false ),
new( "/a/" , "/x/a/b" , false , false ),
Expand Down

0 comments on commit cdcd619

Please sign in to comment.