This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 4d5048f9826627ad9f80627bf28ff7b15bd489ac Author: Mark Thomas <[email protected]> AuthorDate: Fri Apr 3 21:12:27 2020 +0100 Update unit tests now space is not inserted. --- test/org/apache/tomcat/util/http/parser/TestMediaType.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/org/apache/tomcat/util/http/parser/TestMediaType.java b/test/org/apache/tomcat/util/http/parser/TestMediaType.java index 06c234e..6f16f14 100644 --- a/test/org/apache/tomcat/util/http/parser/TestMediaType.java +++ b/test/org/apache/tomcat/util/http/parser/TestMediaType.java @@ -142,9 +142,9 @@ public class TestMediaType { StringReader sr = new StringReader(sb.toString()); MediaType m = MediaType.parseMediaType(sr); - Assert.assertEquals("foo/bar; charset=UTF-8; a=b", m.toString()); + Assert.assertEquals("foo/bar;charset=UTF-8;a=b", m.toString()); Assert.assertEquals(CHARSET, m.getCharset()); - Assert.assertEquals("foo/bar; a=b", m.toStringNoCharset()); + Assert.assertEquals("foo/bar;a=b", m.toStringNoCharset()); } @@ -184,8 +184,8 @@ public class TestMediaType { Assert.assertEquals("\"application/smil;charset=UTF-8\"", m.getParameterValue("Type")); - String expected = "multipart/related; boundary=1_4F50BD36_CDF8C28; " + - "start=\"<31671603.smil>\"; " + + String expected = "multipart/related;boundary=1_4F50BD36_CDF8C28;" + + "start=\"<31671603.smil>\";" + "type=\"application/smil;charset=UTF-8\""; Assert.assertEquals(expected, m.toString()); Assert.assertEquals(expected, m.toStringNoCharset()); @@ -211,7 +211,7 @@ public class TestMediaType { Assert.assertEquals("UTF-8", m.getCharset()); // Note: Invalid input is filtered out - Assert.assertEquals("text/html; charset=UTF-8", m.toString()); + Assert.assertEquals("text/html;charset=UTF-8", m.toString()); Assert.assertEquals("UTF-8", m.getCharset()); } @@ -231,7 +231,7 @@ public class TestMediaType { Assert.assertEquals("UTF-8", m.getParameterValue("charset")); Assert.assertEquals("UTF-8", m.getCharset()); - Assert.assertEquals("text/html; charset=UTF-8", m.toString()); + Assert.assertEquals("text/html;charset=UTF-8", m.toString()); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
