On 18 March 2013 14:56, <simonetrip...@apache.org> wrote: > Author: simonetripodi > Date: Mon Mar 18 14:56:34 2013 > New Revision: 1457788 > > URL: http://svn.apache.org/r1457788 > Log: > [FILEUPLOAD-232] started importing MimeUtility test case from > http://svn.apache.org/repos/asf/geronimo/specs/tags/geronimo-javamail_1.4_spec-1.4/src/test/java/javax/mail/internet/MimeUtilityTest.java > > Added: > > commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/ > > commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/ > > commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java > (with props) > > Added: > commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java > URL: > http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java?rev=1457788&view=auto > ============================================================================== > --- > commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java > (added) > +++ > commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java > Mon Mar 18 14:56:34 2013 > @@ -0,0 +1,42 @@ > +/* > + * Licensed to the Apache Software Foundation (ASF) under one or more > + * contributor license agreements. See the NOTICE file distributed with > + * this work for additional information regarding copyright ownership. > + * The ASF licenses this file to You under the Apache License, Version 2.0 > + * (the "License"); you may not use this file except in compliance with > + * the License. You may obtain a copy of the License at > + * > + * http://www.apache.org/licenses/LICENSE-2.0 > + * > + * Unless required by applicable law or agreed to in writing, software > + * distributed under the License is distributed on an "AS IS" BASIS, > + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. > + * See the License for the specific language governing permissions and > + * limitations under the License. > + */ > +package org.apache.commons.fileupload.utils.mime; > + > +import static org.junit.Assert.assertEquals; > + > +import org.apache.commons.fileupload.util.mime.MimeUtility; > +import org.junit.Test; > + > +/** > + * @since 1.3 > + */ > +public final class MimeUtilityTestCase { > + > + @Test > + public void testEncodeText() throws Exception { > + assertEncoded("abc", "abc"); > + > + assertEncoded(" hé! àèôu !!!", > "=?UTF-8?Q?_h=C3=A9!_=C3=A0=C3=A8=C3=B4u_!!!?="); > + > + assertEncoded(" hé! àèôu !!!", > "=?UTF-8?B?IGjDqSEgw6DDqMO0dSAhISE=?="); > + } > + > + private static void assertEncoded(String expected, String encoded) > throws Exception { > + assertEquals(expected, MimeUtility.decodeText(encoded)); > + } > + > +} > > Propchange: > commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java > ------------------------------------------------------------------------------ > svn:eol-style = native > > Propchange: > commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java > ------------------------------------------------------------------------------ > svn:keywords = Date Author Id Revision HeadURL
Best not to enable Date or HeadURL; they are both dependent on the user's settings (Locale and http/https) Not sure there is a use-case for Author either. For a short way to identify a file version, use $Revision$; for the longer version use $Id$ I don't think there's any need for anything else. > Propchange: > commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java > ------------------------------------------------------------------------------ > svn:mime-type = text/plain > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org