From dc0a82bb93af56060f575941c0b2f6ec73331793 Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Mon, 23 Mar 2009 16:37:58 +0000 Subject: [PATCH] Added test for multiple template variables in one path segment. --- .../org/springframework/web/util/UriTemplateTests.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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