@@ -553,6 +553,24 @@ TEST_F(PathMatcherTest, CustomVerbMatch4) {
553
553
EXPECT_EQ (LookupNoBindings (" GET" , " /foo/other:verb/hello" ), a);
554
554
}
555
555
556
+ TEST_F (PathMatcherTest, CustomVerbMatch5) {
557
+ MethodInfo* verb = AddGetPath (" /{a=**}:verb" );
558
+ MethodInfo* non_verb = AddGetPath (" /{a=**}" );
559
+ Build ();
560
+ Bindings bindings;
561
+ EXPECT_EQ (Lookup (" GET" , " /some:verb/const:verb" , &bindings), verb);
562
+ EXPECT_EQ (bindings.size (), 1 );
563
+ EXPECT_EQ (bindings[0 ].value , " some:verb/const" );
564
+ bindings.clear ();
565
+ EXPECT_EQ (Lookup (" GET" , " /some:verb/const" , &bindings), non_verb);
566
+ EXPECT_EQ (bindings.size (), 1 );
567
+ EXPECT_EQ (bindings[0 ].value , " some:verb/const" );
568
+ bindings.clear ();
569
+ EXPECT_EQ (Lookup (" GET" , " /some:verb2/const:verb2" , &bindings), non_verb);
570
+ EXPECT_EQ (bindings.size (), 1 );
571
+ EXPECT_EQ (bindings[0 ].value , " some:verb2/const:verb2" );
572
+ }
573
+
556
574
TEST_F (PathMatcherTest, RejectPartialMatches) {
557
575
MethodInfo* prefix_middle_suffix = AddGetPath (" /prefix/middle/suffix" );
558
576
MethodInfo* prefix_middle = AddGetPath (" /prefix/middle" );
0 commit comments