You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bo...@apache.org on 2002/07/04 14:42:48 UTC
cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant IncludeTest.java
bodewig 2002/07/04 05:42:48
Modified: src/testcases/org/apache/tools/ant Tag: ANT_15_BRANCH
IncludeTest.java
Log:
Exact message as well as the line number for the parse errors seem to
depend on the parser - the original values have been for Xerces and cause
failures with JDK 1.4's crimson.
Revision Changes Path
No revision
No revision
1.3.2.2 +6 -8 jakarta-ant/src/testcases/org/apache/tools/ant/IncludeTest.java
Index: IncludeTest.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/IncludeTest.java,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -r1.3.2.1 -r1.3.2.2
--- IncludeTest.java 4 Jul 2002 07:38:40 -0000 1.3.2.1
+++ IncludeTest.java 4 Jul 2002 12:42:48 -0000 1.3.2.2
@@ -97,11 +97,9 @@
configureProject("src/etc/testcases/core/include/including_file_parse_error/build.xml");
fail("should have caused a parser exception");
} catch (BuildException e) {
- assertEquals("Unexpected text \"extraneous_text\"",
- e.getMessage());
assertTrue(e.getLocation().toString()
- + " should end with build.xml:13: ",
- e.getLocation().toString().endsWith("build.xml:13: "));
+ + " should refer to build.xml",
+ e.getLocation().toString().indexOf("build.xml:") > -1);
}
}
@@ -109,6 +107,7 @@
configureProject("src/etc/testcases/core/include/including_file_task_error/build.xml");
try {
executeTarget("test");
+ fail("should have cause a build failure");
} catch (BuildException e) {
assertTrue(e.getMessage()
+ " should start with \'Warning: Could not find",
@@ -124,12 +123,10 @@
configureProject("src/etc/testcases/core/include/included_file_parse_error/build.xml");
fail("should have caused a parser exception");
} catch (BuildException e) {
- assertEquals("Unexpected text \"e\"",
- e.getMessage());
assertTrue(e.getLocation().toString()
- + " should end with included_file.xml:2: ",
+ + " should refer to included_file.xml",
e.getLocation().toString()
- .endsWith("included_file.xml:2: "));
+ .indexOf("included_file.xml:") > -1);
}
}
@@ -137,6 +134,7 @@
configureProject("src/etc/testcases/core/include/included_file_task_error/build.xml");
try {
executeTarget("test");
+ fail("should have cause a build failure");
} catch (BuildException e) {
assertTrue(e.getMessage()
+ " should start with \'Warning: Could not find",
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>