Author: kkolinko
Date: Sun Nov 6 21:23:36 2011
New Revision: 1198567
URL: http://svn.apache.org/viewvc?rev=1198567&view=rev
Log:
Porting r1187806 - whitespace cleanup in /test
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestAttributeParser.java
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestCompiler.java
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestGenerator.java
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestJspConfig.java
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestJspDocumentParser.java
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestParser.java
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestParserNoStrictWhitespace.java
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestScriptingVariabler.java
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestValidator.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/buf/TestByteChunk.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapper.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperWelcomeFiles.java
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestAttributeParser.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestAttributeParser.java?rev=1198567&r1=1198566&r2=1198567&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestAttributeParser.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestAttributeParser.java
Sun Nov 6 21:23:36 2011
@@ -76,7 +76,7 @@ public class TestAttributeParser {
evalAttr("${0 lt 2 ? 1 lt 2 ? 'many': 'one': 'none'}", '\"'));
}
-
+
/**
* Test the quoting requirements of JSP attributes. This doesn't make use
of
* EL. See {@link #testBug45451()} for a test that combines JSP attribute
@@ -95,7 +95,7 @@ public class TestAttributeParser {
assertEquals("hello world\"", evalAttr("hello world\"", '\"'));
assertEquals("hello world'", evalAttr("hello world\\'", '\"'));
assertEquals("hello world\"", evalAttr("hello world\\\"", '\"'));
-
+
assertEquals("hello 'world'", evalAttr("hello 'world'", '\''));
assertEquals("hello 'world", evalAttr("hello 'world", '\''));
assertEquals("hello world'", evalAttr("hello world'", '\''));
@@ -125,7 +125,7 @@ public class TestAttributeParser {
public void testLiteral() {
// Inspired by work on bug 45451, comments from kkolinko on the dev
// list and looking at the spec to find some edge cases
-
+
// '\' is only an escape character inside a StringLiteral
assertEquals("\\", evalAttr("${'\\\\\\\\'}", '\"'));
assertEquals("\\", evalAttr("${\"\\\\\\\\\"}", '\"'));
@@ -140,7 +140,7 @@ public class TestAttributeParser {
assertEquals("'\\", evalAttr("${\\\"'\\\\\\\\\\\"}", '\"'));
assertEquals("\\\"", evalAttr("${\\\"\\\\\\\\\\\\\\\"\\\"}", '\"'));
assertEquals("\"\\", evalAttr("${\\\"\\\\\\\"\\\\\\\\\\\"}", '\"'));
-
+
// Quoting <% and %>
assertEquals("hello <% world", evalAttr("hello <\\% world", '\"'));
assertEquals("hello %> world", evalAttr("hello %> world", '\"'));
@@ -170,7 +170,7 @@ public class TestAttributeParser {
}
private String evalAttr(String expression, char quote) {
-
+
ELContextImpl ctx = new ELContextImpl();
ctx.setFunctionMapper(new FMapper());
ExpressionFactoryImpl exprFactory = new ExpressionFactoryImpl();
@@ -180,7 +180,7 @@ public class TestAttributeParser {
String.class);
return (String) ve.getValue(ctx);
}
-
+
private String parseScriptExpression(String expression, char quote) {
return AttributeParser.getUnquoted(expression, quote, false, false,
false);
@@ -199,7 +199,7 @@ public class TestAttributeParser {
// Ignore
} catch (NoSuchMethodException e) {
// Ignore
- }
+ }
}
return null;
}
Modified: tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestCompiler.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestCompiler.java?rev=1198567&r1=1198566&r2=1198567&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestCompiler.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestCompiler.java Sun
Nov 6 21:23:36 2011
@@ -42,14 +42,14 @@ public class TestCompiler extends Tomcat
ByteChunk res = new ByteChunk();
Map<String,List<String>> headers = new HashMap<String,List<String>>();
-
+
getUrl("http://localhost:" + getPort() +
"/test/bug49nnn/bug49726a.jsp",
res, headers);
// Check request completed
String result = res.toString();
assertEcho(result, "OK");
-
+
// Check content type
assertTrue(headers.get("Content-Type").get(0).startsWith("text/html"));
}
@@ -64,14 +64,14 @@ public class TestCompiler extends Tomcat
ByteChunk res = new ByteChunk();
Map<String,List<String>> headers = new HashMap<String,List<String>>();
-
+
getUrl("http://localhost:" + getPort() +
"/test/bug49nnn/bug49726b.jsp",
res, headers);
// Check request completed
String result = res.toString();
assertEcho(result, "OK");
-
+
// Check content type
assertTrue(headers.get("Content-Type").get(0).startsWith("text/plain"));
}
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestGenerator.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestGenerator.java?rev=1198567&r1=1198566&r2=1198567&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestGenerator.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestGenerator.java Sun
Nov 6 21:23:36 2011
@@ -46,16 +46,16 @@ public class TestGenerator extends Tomca
public void testBug45015a() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = getUrl("http://localhost:" + getPort() +
"/test/bug45nnn/bug45015a.jsp");
-
+
String result = res.toString();
// Beware of the differences between escaping in JSP attributes and
// in Java Strings
@@ -75,16 +75,16 @@ public class TestGenerator extends Tomca
public void testBug45015b() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
int rc = getUrl("http://localhost:" + getPort() +
"/test/bug45nnn/bug45015b.jsp", new ByteChunk(), null);
-
+
assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, rc);
}
@@ -92,16 +92,16 @@ public class TestGenerator extends Tomca
public void testBug45015c() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
int rc = getUrl("http://localhost:" + getPort() +
"/test/bug45nnn/bug45015c.jsp", new ByteChunk(), null);
-
+
assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, rc);
}
@@ -109,21 +109,21 @@ public class TestGenerator extends Tomca
public void testBug48701Fail() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-3.0");
// app dir is relative to server home
StandardContext ctxt = (StandardContext) tomcat.addWebapp(null,
"/test", appDir.getAbsolutePath());
-
+
// This test needs the JSTL libraries
File lib = new File("webapps/examples/WEB-INF/lib");
ctxt.setAliases("/WEB-INF/lib=" + lib.getCanonicalPath());
-
+
tomcat.start();
int rc = getUrl("http://localhost:" + getPort() +
"/test/bug48nnn/bug48701-fail.jsp", new ByteChunk(), null);
-
+
assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, rc);
}
@@ -146,20 +146,20 @@ public class TestGenerator extends Tomca
public void testBug48701TagVariableInfoNameFromAttribute() throws
Exception {
testBug48701("bug48nnn/bug48701-TVI-NFA.jsp");
}
-
+
private void testBug48701(String jsp) throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = getUrl("http://localhost:" + getPort() +
"/test/" + jsp);
-
+
String result = res.toString();
assertEcho(result, "00-PASS");
}
@@ -186,9 +186,9 @@ public class TestGenerator extends Tomca
return super.doStartTag();
}
-
+
}
-
+
public static class Bug48701TEI extends TagExtraInfo {
@Override
@@ -200,7 +200,7 @@ public class TestGenerator extends Tomca
}
}
-
+
public static class Bean {
private String time;
@@ -231,7 +231,7 @@ public class TestGenerator extends Tomca
ByteChunk res = new ByteChunk();
Map<String,List<String>> headers = new HashMap<String,List<String>>();
-
+
getUrl("http://localhost:" + getPort() + "/test/bug49nnn/bug49799.jsp",
res, headers);
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestJspConfig.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestJspConfig.java?rev=1198567&r1=1198566&r2=1198567&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestJspConfig.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestJspConfig.java Sun
Nov 6 21:23:36 2011
@@ -33,18 +33,18 @@ public class TestJspConfig extends Tomca
public void testServlet23NoEL() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-2.3");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = getUrl("http://localhost:" + getPort() +
"/test/el-as-literal.jsp");
String result = res.toString();
-
+
assertTrue(result.indexOf("<p>00-${'hello world'}</p>") > 0);
assertTrue(result.indexOf("<p>01-#{'hello world'}</p>") > 0);
}
@@ -53,18 +53,18 @@ public class TestJspConfig extends Tomca
public void testServlet24NoEL() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-2.4");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = getUrl("http://localhost:" + getPort() +
"/test/el-as-literal.jsp");
String result = res.toString();
-
+
assertTrue(result.indexOf("<p>00-hello world</p>") > 0);
assertTrue(result.indexOf("<p>01-#{'hello world'}</p>") > 0);
}
@@ -73,18 +73,18 @@ public class TestJspConfig extends Tomca
public void testServlet25NoEL() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-2.5");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = getUrl("http://localhost:" + getPort() +
"/test/el-as-literal.jsp");
String result = res.toString();
-
+
assertTrue(result.indexOf("<p>00-hello world</p>") > 0);
}
@@ -92,18 +92,18 @@ public class TestJspConfig extends Tomca
public void testServlet30NoEL() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = getUrl("http://localhost:" + getPort() +
"/test/el-as-literal.jsp");
String result = res.toString();
-
+
assertTrue(result.indexOf("<p>00-hello world</p>") > 0);
}
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestJspDocumentParser.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestJspDocumentParser.java?rev=1198567&r1=1198566&r2=1198567&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestJspDocumentParser.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestJspDocumentParser.java
Sun Nov 6 21:23:36 2011
@@ -37,16 +37,16 @@ public class TestJspDocumentParser exten
public void testBug47977() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
int rc = getUrl("http://localhost:" + getPort() +
"/test/bug47977.jspx", new ByteChunk(), null);
-
+
assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, rc);
}
@@ -54,11 +54,11 @@ public class TestJspDocumentParser exten
public void testBug48827() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
Exception e = null;
Modified: tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestParser.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestParser.java?rev=1198567&r1=1198566&r2=1198567&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestParser.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestParser.java Sun
Nov 6 21:23:36 2011
@@ -40,16 +40,16 @@ public class TestParser extends TomcatBa
public void testBug48627() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = getUrl("http://localhost:" + getPort() +
"/test/bug48nnn/bug48627.jsp");
-
+
String result = res.toString();
// Beware of the differences between escaping in JSP attributes and
// in Java Strings
@@ -61,11 +61,11 @@ public class TestParser extends TomcatBa
public void testBug48668a() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = getUrl("http://localhost:" + getPort() +
@@ -110,7 +110,7 @@ public class TestParser extends TomcatBa
File appDir = new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = getUrl("http://localhost:" + getPort() +
@@ -127,7 +127,7 @@ public class TestParser extends TomcatBa
File appDir = new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
int sc = getUrl("http://localhost:" + getPort() +
@@ -144,7 +144,7 @@ public class TestParser extends TomcatBa
File appDir = new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
int sc = getUrl("http://localhost:" + getPort() +
@@ -162,7 +162,7 @@ public class TestParser extends TomcatBa
File appDir = new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = new ByteChunk();
@@ -182,7 +182,7 @@ public class TestParser extends TomcatBa
File appDir = new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = new ByteChunk();
@@ -202,7 +202,7 @@ public class TestParser extends TomcatBa
File appDir = new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = new ByteChunk();
@@ -221,7 +221,7 @@ public class TestParser extends TomcatBa
File appDir = new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = new ByteChunk();
@@ -240,7 +240,7 @@ public class TestParser extends TomcatBa
File appDir = new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = new ByteChunk();
@@ -259,7 +259,7 @@ public class TestParser extends TomcatBa
File appDir = new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = new ByteChunk();
@@ -278,7 +278,7 @@ public class TestParser extends TomcatBa
File appDir = new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = new ByteChunk();
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestParserNoStrictWhitespace.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestParserNoStrictWhitespace.java?rev=1198567&r1=1198566&r2=1198567&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestParserNoStrictWhitespace.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestParserNoStrictWhitespace.java
Sun Nov 6 21:23:36 2011
@@ -35,7 +35,7 @@ import org.apache.tomcat.util.buf.ByteCh
* enabled by default.
*/
public class TestParserNoStrictWhitespace extends TomcatBaseTest {
-
+
@Override
public void setUp() throws Exception {
System.setProperty(
@@ -48,16 +48,16 @@ public class TestParserNoStrictWhitespac
public void testBug48627() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = getUrl("http://localhost:" + getPort() +
"/test/bug48nnn/bug48627.jsp");
-
+
String result = res.toString();
// Beware of the differences between escaping in JSP attributes and
// in Java Strings
@@ -69,11 +69,11 @@ public class TestParserNoStrictWhitespac
public void testBug48668a() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = getUrl("http://localhost:" + getPort() +
@@ -118,7 +118,7 @@ public class TestParserNoStrictWhitespac
File appDir = new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = getUrl("http://localhost:" + getPort() +
@@ -136,7 +136,7 @@ public class TestParserNoStrictWhitespac
File appDir = new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = new ByteChunk();
@@ -156,7 +156,7 @@ public class TestParserNoStrictWhitespac
File appDir = new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
int sc = getUrl("http://localhost:" + getPort() +
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestScriptingVariabler.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestScriptingVariabler.java?rev=1198567&r1=1198566&r2=1198567&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestScriptingVariabler.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestScriptingVariabler.java
Sun Nov 6 21:23:36 2011
@@ -38,11 +38,11 @@ public class TestScriptingVariabler exte
public void testBug42390() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
Exception e = null;
@@ -55,7 +55,7 @@ public class TestScriptingVariabler exte
// Should not fail
assertNull(e);
}
-
+
public static class Bug48616aTag extends TagSupport {
private static final long serialVersionUID = 1L;
}
@@ -81,11 +81,11 @@ public class TestScriptingVariabler exte
public void testBug48616() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
Exception e = null;
@@ -103,11 +103,11 @@ public class TestScriptingVariabler exte
public void testBug48616b() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
Exception e = null;
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestValidator.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestValidator.java?rev=1198567&r1=1198566&r2=1198567&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestValidator.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestValidator.java Sun
Nov 6 21:23:36 2011
@@ -39,16 +39,16 @@ public class TestValidator extends Tomca
public void testBug47331() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
int rc = getUrl("http://localhost:" + getPort() +
"/test/bug47331.jsp", new ByteChunk(), null);
-
+
assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, rc);
}
@@ -56,11 +56,11 @@ public class TestValidator extends Tomca
public void testTldVersions23() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-2.3");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = getUrl("http://localhost:" + getPort() +
@@ -81,11 +81,11 @@ public class TestValidator extends Tomca
public void testTldVersions24() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-2.4");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = getUrl("http://localhost:" + getPort() +
@@ -106,11 +106,11 @@ public class TestValidator extends Tomca
public void testTldVersions25() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-2.5");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = getUrl("http://localhost:" + getPort() +
@@ -131,11 +131,11 @@ public class TestValidator extends Tomca
public void testTldVersions30() throws Exception {
Tomcat tomcat = getTomcatInstance();
- File appDir =
+ File appDir =
new File("test/webapp-3.0");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
-
+
tomcat.start();
ByteChunk res = getUrl("http://localhost:" + getPort() +
@@ -151,7 +151,7 @@ public class TestValidator extends Tomca
assertTrue(result.indexOf("<p>#{'05-hello world'}</p>") > 0);
assertTrue(result.indexOf("<p>06-hello world</p>") > 0);
}
-
+
public static class Echo extends TagSupport {
private static final long serialVersionUID = 1L;
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/buf/TestByteChunk.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/buf/TestByteChunk.java?rev=1198567&r1=1198566&r2=1198567&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/buf/TestByteChunk.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/buf/TestByteChunk.java Sun
Nov 6 21:23:36 2011
@@ -40,7 +40,7 @@ public class TestByteChunk {
/**
* Test for {@code findByte} vs. {@code indexOf} methods difference.
- *
+ *
* <p>
* As discussed in the "Re: r944918" thread on dev@, {@code
* ByteChunk.indexOf()} works for 0-127 ASCII chars only, and cannot find
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java?rev=1198567&r1=1198566&r2=1198567&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java
Sun Nov 6 21:23:36 2011
@@ -42,17 +42,17 @@ public abstract class CookiesBaseTest ex
public static class CookieServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
-
+
private final String cookieName;
private final String cookieValue;
-
+
public CookieServlet(String cookieName, String cookieValue) {
this.cookieName = cookieName;
this.cookieValue = cookieValue;
}
-
+
@Override
- public void doGet(HttpServletRequest req, HttpServletResponse res)
+ public void doGet(HttpServletRequest req, HttpServletResponse res)
throws IOException {
try {
Cookie cookie = new Cookie(cookieName, cookieValue);
@@ -62,13 +62,13 @@ public abstract class CookiesBaseTest ex
res.getWriter().write("Cookie name fail");
}
}
-
+
}
-
+
public static void addServlets(Tomcat tomcat) {
// Must have a real docBase - just use temp
- Context ctx =
+ Context ctx =
tomcat.addContext("", System.getProperty("java.io.tmpdir"));
Tomcat.addServlet(ctx, "invalid", new CookieServlet("na;me", "value"));
@@ -91,5 +91,5 @@ public abstract class CookiesBaseTest ex
}
public abstract void testCookiesInstance() throws Exception;
-
+
}
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapper.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapper.java?rev=1198567&r1=1198566&r2=1198567&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapper.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapper.java
Sun Nov 6 21:23:36 2011
@@ -54,7 +54,7 @@ public class TestMapper {
String[] welcomes = new String[2];
welcomes[0] = "boo/baba";
welcomes[1] = "bobou";
-
+
mapper.addContextVersion("iowejoiejfoiew", "blah7", "",
"0", "context0", new String[0], null);
mapper.addContextVersion("iowejoiejfoiew", "blah7", "/foo",
@@ -86,10 +86,10 @@ public class TestMapper {
public void testAddHost() throws Exception {
// Check we have the right number (add 16 but one is a duplicate)
assertEquals(15, mapper.hosts.length);
-
+
// Make sure adding a duplicate *does not* overwrite
assertEquals("blah7", mapper.hosts[3].object);
-
+
// Check for alphabetical order of host names
String previous;
String current = mapper.hosts[0].name;
@@ -150,7 +150,7 @@ public class TestMapper {
mapper.map(host, uri, null, mappingData);
}
long time = System.currentTimeMillis() - start;
-
+
// Takes ~1s on markt's laptop. If this takes more than 4s something
// probably needs looking at. If this fails repeatedly then we may need
// to increase this limit.
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperWelcomeFiles.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperWelcomeFiles.java?rev=1198567&r1=1198566&r2=1198567&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperWelcomeFiles.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperWelcomeFiles.java
Sun Nov 6 21:23:36 2011
@@ -5,9 +5,9 @@
* 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.
@@ -38,7 +38,7 @@ public class TestMapperWelcomeFiles exte
public void testWelcomeFileNotStrict() throws Exception {
Tomcat tomcat = getTomcatInstance();
-
+
File appDir = new File("test/webapp-3.0");
StandardContext ctxt = (StandardContext) tomcat.addWebapp(null,
"/test",
@@ -47,14 +47,14 @@ public class TestMapperWelcomeFiles exte
ctxt.addWelcomeFile("index.jsp");
// Mapping for *.do is defined in web.xml
ctxt.addWelcomeFile("index.do");
-
+
tomcat.start();
ByteChunk bc = new ByteChunk();
int rc = getUrl("http://localhost:" + getPort() +
"/test/welcome-files", bc, new HashMap<String,List<String>>());
assertEquals(HttpServletResponse.SC_OK, rc);
assertTrue(bc.toString().contains("JSP"));
-
+
rc = getUrl("http://localhost:" + getPort() +
"/test/welcome-files/sub", bc,
new HashMap<String,List<String>>());
@@ -66,7 +66,7 @@ public class TestMapperWelcomeFiles exte
public void testWelcomeFileStrict() throws Exception {
Tomcat tomcat = getTomcatInstance();
-
+
File appDir = new File("test/webapp-3.0");
StandardContext ctxt = (StandardContext) tomcat.addWebapp(null,
"/test",
@@ -75,17 +75,17 @@ public class TestMapperWelcomeFiles exte
ctxt.addWelcomeFile("index.jsp");
// Mapping for *.do is defined in web.xml
ctxt.addWelcomeFile("index.do");
-
+
// Simulate STRICT_SERVLET_COMPLIANCE
ctxt.setResourceOnlyServlets("");
-
+
tomcat.start();
ByteChunk bc = new ByteChunk();
int rc = getUrl("http://localhost:" + getPort() +
"/test/welcome-files", bc, new HashMap<String,List<String>>());
assertEquals(HttpServletResponse.SC_OK, rc);
assertTrue(bc.toString().contains("JSP"));
-
+
rc = getUrl("http://localhost:" + getPort() +
"/test/welcome-files/sub", bc,
new HashMap<String,List<String>>());
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]