You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ecs-dev@jakarta.apache.org by rd...@apache.org on 2001/07/26 00:09:25 UTC
cvs commit: jakarta-ecs/example TestBed.java
rdonkin 01/07/25 15:09:25
Modified: example TestBed.java
Log:
credited mason ham + various additional methods
Revision Changes Path
1.17 +63 -2 jakarta-ecs/example/TestBed.java
Index: TestBed.java
===================================================================
RCS file: /home/cvs/jakarta-ecs/example/TestBed.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- TestBed.java 2001/06/22 19:43:31 1.16
+++ TestBed.java 2001/07/25 22:09:25 1.17
@@ -72,9 +72,10 @@
Pass the method name if you want that to be tested
or 'all' to call all test methods in turn.
- @version $Id: TestBed.java,v 1.16 2001/06/22 19:43:31 snagy Exp $
+ @version $Id: TestBed.java,v 1.17 2001/07/25 22:09:25 rdonkin Exp $
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
+ @author <a href="mailto:mlham@alphawolf.com">Mason Ham</a>
*/
public class TestBed
{
@@ -600,6 +601,7 @@
public static void testSelectOption()
{
Select b = new Select("forminput", "5");
+ b.setPrettyPrint(true);
b.setFilter ( new CharacterFilter().addAttribute ("&", "&" ) );
b.addElement( new Option("myvalue1").addElement("showmy&value1"))
.addElement ( new Option ("myvalue2").addElement("showmyvalue2") );
@@ -1095,7 +1097,7 @@
{
XhtmlFrameSetDocument doc = new XhtmlFrameSetDocument();
// methods not present in 1.4.1 commented out so that i can do comparative testing
-// doc.setDoctype(new org.apache.ecs.Doctype.XHtml10Frameset());
+ doc.setDoctype(new org.apache.ecs.Doctype.XHtml10Frameset());
doc.appendTitle("title");
// methods not present in 1.4.1 commented out so that i can do comparative testing
// doc.appendHead(new org.apache.ecs.xhtml.meta("keywords","test,org.apache.ecs"));
@@ -1108,6 +1110,65 @@
"theFrameName",
"frame.html"));
System.out.println(doc.toString());
+ }
+
+ public void testXhtml()
+ {
+ XhtmlDocument doc = new XhtmlDocument();
+ doc.setDoctype(new org.apache.ecs.Doctype.XHtml10Strict());
+ doc.appendTitle("title");
+// methods not present in 1.4.1 commented out so that i can do comparative testing
+// doc.appendHead(new org.apache.ecs.xhtml.meta("keywords","test,org.apache.ecs"));
+ doc.appendBody(new org.apache.ecs.xhtml.hr());
+ doc.appendBody("The body part of this document.");
+ doc.appendBody(new org.apache.ecs.xhtml.hr());
+ System.out.println(doc.toString());
+ }
+
+ public void testHTMLDoctypes()
+ {
+ Document doc=new Document();
+ doc.appendTitle("title");
+ doc.appendBody(new org.apache.ecs.html.HR());
+ doc.appendBody("The body part of this document.");
+ doc.appendBody(new org.apache.ecs.html.HR());
+ doc.getHtml().setPrettyPrint(true);
+
+ System.out.println();
+ System.out.println("********Html40Strict********");
+ doc.setDoctype(new org.apache.ecs.Doctype.Html40Strict());
+ doc.output(System.out);
+ System.out.println();
+
+ System.out.println();
+ System.out.println("********Html401Strict********");
+ doc.setDoctype(new org.apache.ecs.Doctype.Html401Strict());
+ doc.output(System.out);
+ System.out.println();
+
+ System.out.println();
+ System.out.println("********Html40Frameset********");
+ doc.setDoctype(new org.apache.ecs.Doctype.Html40Frameset());
+ doc.output(System.out);
+ System.out.println();
+
+ System.out.println();
+ System.out.println("********Html401Frameset********");
+ doc.setDoctype(new org.apache.ecs.Doctype.Html401Frameset());
+ doc.output(System.out);
+ System.out.println();
+
+ System.out.println();
+ System.out.println("********Html40Transitional********");
+ doc.setDoctype(new org.apache.ecs.Doctype.Html40Transitional());
+ doc.output(System.out);
+ System.out.println();
+
+ System.out.println();
+ System.out.println("********Html401Transitional********");
+ doc.setDoctype(new org.apache.ecs.Doctype.Html401Transitional());
+ doc.output(System.out);
+ System.out.println();
}
//-------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: ecs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ecs-dev-help@jakarta.apache.org