diff --git a/org.springframework.web/src/test/java/org/springframework/web/util/UriTemplateTests.java b/org.springframework.web/src/test/java/org/springframework/web/util/UriTemplateTests.java index a1f2b1b005..2a3d46b529 100644 --- a/org.springframework.web/src/test/java/org/springframework/web/util/UriTemplateTests.java +++ b/org.springframework.web/src/test/java/org/springframework/web/util/UriTemplateTests.java @@ -121,4 +121,14 @@ public class UriTemplateTests { Map expected = Collections.singletonMap("c", "cheeseburger"); assertEquals("Invalid match", expected, result); } + + @Test + public void matchMultipleInOneSegment() throws Exception { + template = new UriTemplate("/{foo}-{bar}"); + Map result = template.match("/12-34"); + Map expected = new HashMap(2); + expected.put("foo", "12"); + expected.put("bar", "34"); + assertEquals("Invalid match", expected, result); + } } \ No newline at end of file