Add test space.

This commit is contained in:
administrateur 2007-01-18 13:07:25 +01:00
parent b1db8ddb59
commit f443d9c175
16 changed files with 198 additions and 0 deletions

91
build.xml~ Normal file
View file

@ -0,0 +1,91 @@
<?xml version="1.0"?>
<!DOCTYPE project>
<!-- Builds the XID Framework jar filen. -->
<project name="xid" default="all" basedir=".">
<property name="targetjar" value="xid.jar"/>
<property name="zip_file" value="xid.zip"/> <!-- Release zip file -->
<property name="src" value="src"/>
<property name="build" value="build"/>
<property name="doc" value="doc"/>
<property name="dist" value="dist"/>
<property name="resources" value="resources"/>
<property name="debug" value="on"/>
<target name="all" depends="compile,xid_dist,examples" />
<!-- ******* Init ******* -->
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
<mkdir dir="${build}/classes"/>
<mkdir dir="${dist}"/>
</target>
<!-- ******* Compile ******* -->
<target name="compile" depends="init">
<javac srcdir="${src}" destdir="${build}/classes" debug="${debug}" deprecation="on">
<classpath>
<fileset dir="lib" includes="**/*.jar"/>
</classpath>
</javac>
</target>
<!-- ****** xid.jar ****** -->
<target name="xid_dist" depends="compile">
<jar update="no" jarfile="dist/xid.jar">
<fileset dir="build/classes" includes="xid/**/**.class" />
<fileset dir="resources" includes="**" />
</jar>
</target>
<!-- ******* Examples (the webapp). ******* -->
<target name="examples" depends="xid_dist">
<copy todir="webapp-examples/WEB-INF/lib">
<fileset dir="lib" includes="*.jar" excludes="servlet-api.jar"/>
<fileset dir="dist" includes="*.jar"/>
</copy>
<copy file="${dist}/xid.jar" todir="webapp-examples/WEB-INF/lib" overwrite="yes" preservelastmodified="yes"/>
<delete>
<fileset dir="webapp-examples/WEB-INF/classes/" includes="**.class"/>
<fileset dir="webapp-examples/WEB-INF/classes/" includes="**/**.class"/>
</delete>
<javac srcdir="webapp-examples/WEB-INF/classes/" destdir="webapp-examples/WEB-INF/classes/" debug="${debug}" deprecation="on">
<classpath>
<fileset dir="webapp-examples/WEB-INF/lib" includes="**.jar"/>
</classpath>
</javac>
</target>
<!-- ****** JavaDoc ****** -->
<target name="javadoc" depends="compile">
<javadoc sourcepath="${src}" packageNames="xid.*" destdir="${doc}">
<classpath>
<fileset dir="lib" includes="**/*.jar"/>
</classpath>
</javadoc>
</target>
<!-- *************** Clean ***********************-->
<target name="clean">
<delete dir="${build}"/>
</target>
<!-- *********** Produce ZIP release file ******** -->
<target name="zip">
<zip update="no" zipfile="../${zip_file}" basedir=".">
<include name=".project" />
<include name=".classpath" />
<include name="build.xml" />
<include name="src/**" />
<include name="resources/**" />
<include name="lib/*.jar" />
</zip>
</target>
</project>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
dist/test.jar vendored Normal file

Binary file not shown.

1
dotest Executable file
View file

@ -0,0 +1 @@
$JAVA_HOME/bin/java -classpath lib/activation.jar:lib/log4j-1.2.14.jar:lib/mail.jar:servlet-api.jar:dist/xid.jar:dist/test.jar xid.test.Test

1
dotest~ Executable file
View file

@ -0,0 +1 @@
$JAVA_HOME/bin/java -classpath lib/activation.jar:lib/log4j-1.2.14.jar:lib/mail.jar:servlet-api.jar:dist/xid.jar:dist/test.jar xid.Test

16
test/xid/Test.java Normal file
View file

@ -0,0 +1,16 @@
package xid.test;
import java.util.*;
import java.io.*;
/**
*
*/
class Test
{
public static void main(String[] args)
{
System.out.println("Hello World!");
}
}

73
test/xid/test/Test.java Normal file
View file

@ -0,0 +1,73 @@
package xid;
import java.util.*;
import java.io.*;
import xid.*;
/**
*
*/
class Test
{
public static void main(String[] args)
{
System.out.println("Hello World!");
Presenter xid = new Presenter (getServletContext ().getRealPath ("/"), "testXid.html");
//
TagsData datas = new TagsData ();
TextTagData text;
// Populate attributes of Test 03.
text = new TextTagData ();
datas.put ("test03", text);
text.setText ("mummy");
text.getAttributes ().appendAttribute ("style", "background: blue;");
text.getAttributes ().appendAttribute ("style", "foreground: red;");
text.getAttributes ().setAttribute ("class", "totoClass");
StringBuffer html;
StringBuffer errorMessage;
errorMessage = new StringBuffer ();
html = xid.doXid (datas, errorMessage);
// Display page.
response.setContentType ("text/html");
PrintWriter out = response.getWriter();
out.println ("<html>");
out.println ("<head>");
out.println ("<title>XID TEST</title>");
out.println ("</head>");
out.println ("<body bgcolor=\"orange\">");
out.println ("<hr />");
out.println ("XID TEST<br/>");
if (errorMessage.length () != 0)
{
out.println ("An error occured in Xid treatment.<br/>");
out.println ("<pre>");
out.println (errorMessage);
out.println ("</pre>");
out.println ("<hr />");
out.println ("<pre>" + Presenter.restoreEntities (html) + "</pre>");
out.println ("<hr />");
}
else
{
out.println ("<pre>" + Presenter.restoreEntities (html) + "</pre>");
}
out.println ("</body>");
out.println ("</html>");
log.info ("Exit");
}
}

16
test/xid/test/Test.java~ Normal file
View file

@ -0,0 +1,16 @@
package xid;
import java.util.*;
import java.io.*;
/**
*
*/
class Test
{
public static void main(String[] args)
{
System.out.println("Hello World!");
}
}