summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2001-05-16 12:18:18 +0000
committerKeiron Liddle <keiron@apache.org>2001-05-16 12:18:18 +0000
commit819ffe38fdc5d7638f960eee8d386f21286274bb (patch)
treefa32df6e40bb9d7d55645440874bae152bd80fbe /test
parentbcc5a04eee822e5d26a741580f5a06654ca1fa08 (diff)
downloadxmlgraphics-fop-819ffe38fdc5d7638f960eee8d386f21286274bb.tar.gz
xmlgraphics-fop-819ffe38fdc5d7638f960eee8d386f21286274bb.zip
added some simple test files with blocks
also a script to create pdf from test suites git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194245 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/.cvsignore2
-rw-r--r--test/Testing14
-rw-r--r--test/basictests.xml27
-rwxr-xr-xtest/createpdf.sh3
-rw-r--r--test/xml/bbo1a1.xml169
-rw-r--r--test/xml/bbo1b1.xml48
6 files changed, 257 insertions, 6 deletions
diff --git a/test/.cvsignore b/test/.cvsignore
new file mode 100644
index 000000000..cfe67f584
--- /dev/null
+++ b/test/.cvsignore
@@ -0,0 +1,2 @@
+reference
+areatree
diff --git a/test/Testing b/test/Testing
index 180e73d87..b5dbb4b4f 100644
--- a/test/Testing
+++ b/test/Testing
@@ -2,6 +2,20 @@ Testing procedure for FOP
(to be written using appropriate xml document)
+To Write a new test
+
+Determine what type of test it is:
+- basic conformance test
+- complex conformance, interaction
+- bugtest for fop
+
+You will add the test to the appropriate file.
+
+Write the test. You can either write an fo document which is copied using copy.xsl or simply write a fragment and use one of the standard document xsl's.
+
+Put the test in test/xml.
+Put the information for the test in testsuite xml file, including a result.
+
1) Aim
Need an infrastructure to develop and perform tests.
diff --git a/test/basictests.xml b/test/basictests.xml
index 9a710d885..167066af1 100644
--- a/test/basictests.xml
+++ b/test/basictests.xml
@@ -1,14 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE testsuite SYSTEM "testsuite.dtd">
<testsuite profile="Basic Conformance Tests">
+ <testcases profile="Example">
+ <testcases profile="simpleblock" >
+ <test id="1" interaction="none" fo="block" xml="xml/1.xml" xsl="xsl/doc.xsl" level="basic">
+simple test
+</test>
+ <testresult id="1" agreement="full">
+ </testresult>
+ </testcases>
+ </testcases>
<testcases profile="Block Objects">
- <testcases profile="alignment" >
- <test id="bbo1a1" interaction="none" fo="block" xml="xml/1.xml" xsl="xsl/doc.xsl" level="basic">
-
-6-4-2-1.xml contains only one fo:root element.
-
-
+ <testcases profile="alignment" >
+ <test id="bbo1a1" interaction="none" fo="block" xml="xml/bbo1a1.xml" xsl="xsl/doc.xsl" level="basic">
+all sorts of alignment for blocks
+</test>
+ <testresult id="bbo1a1" agreement="issues">
+ </testresult>
+ </testcases>
+ <testcases profile="keeps breaks" >
+ <test id="bbo1b1" interaction="none" fo="block" xml="xml/bbo1b1.xml" xsl="xsl/doc.xsl" level="basic">
+keeps and breaks for blocks
</test>
+ <testresult id="bbo1b1" agreement="issues">
+ </testresult>
</testcases>
</testcases>
</testsuite>
diff --git a/test/createpdf.sh b/test/createpdf.sh
new file mode 100755
index 000000000..c88ec7970
--- /dev/null
+++ b/test/createpdf.sh
@@ -0,0 +1,3 @@
+# this can be used to create pdf output of the testsuite files
+
+$JAVA_HOME/bin/java -cp ../build/fop.jar:../lib/w3c.jar:../lib/xalan-2.0.0.jar:../lib/xerces-1.2.3.jar:../lib/jimi-1.0.jar org.apache.fop.tools.TestConverter -pdf -b ./ basictests.xml
diff --git a/test/xml/bbo1a1.xml b/test/xml/bbo1a1.xml
new file mode 100644
index 000000000..46585cdd7
--- /dev/null
+++ b/test/xml/bbo1a1.xml
@@ -0,0 +1,169 @@
+<test xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+<data>
+
+<fo:block>
+Test the alignment of text inside a block
+</fo:block>
+
+<fo:block>
+-
+</fo:block>
+
+<fo:block>
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+</fo:block>
+
+<fo:block>
+-
+</fo:block>
+
+<fo:block text-align="start">
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+</fo:block>
+
+<fo:block>
+-
+</fo:block>
+
+<fo:block text-align="end">
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+</fo:block>
+
+<fo:block>
+-
+</fo:block>
+
+<fo:block text-align="justify">
+a bit of text a bit of text a bit of text a bit of text a bit of text a bit of text
+a bit of text a bit of text a bit of text a bit of text a bit of text a bit of text
+a bit of text a bit of text a bit of text a bit of text a bit of text a bit of text
+a bit of text a bit of text a bit of text a bit of text a bit of text a bit of text
+a bit of text a bit of text a bit of text a bit of text a bit of text a bit of text
+</fo:block>
+
+<fo:block>
+-
+</fo:block>
+
+<fo:block text-align="center">
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+</fo:block>
+
+<fo:block>
+-
+</fo:block>
+
+<fo:block text-align="center" text-align-last="relative">
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+</fo:block>
+
+<fo:block>
+-
+</fo:block>
+
+<fo:block text-align="center" text-align-last="end">
+texttext texttext texttext text texttexttext texttext texttext text text
+text text text text texttext texttext text texttexttext text text text text
+text text text text text text text text text text text text text text text text
+</fo:block>
+
+<fo:block>
+-
+</fo:block>
+
+<fo:block text-align="center" text-align-last="justify">
+texttext text texttext texttext texttext texttext texttext texttext text
+texttext texttext texttext texttext texttext texttext texttext texttext
+text text text text text text text text text text text text text text text text
+</fo:block>
+
+<fo:block>
+-
+</fo:block>
+
+<fo:block text-align="center" text-align-last="inside">
+texttext texttext texttext texttext texttext texttext texttext texttext
+text texttext text texttext text texttext text texttext texttext texttext
+text text text text text text text text text text text text text text text text
+</fo:block>
+
+<fo:block>
+-
+</fo:block>
+
+<fo:block text-align="center" text-indent="10pt">
+texttext texttext texttext texttext texttext texttext texttext texttext
+text texttext text texttext text texttext text texttext texttext texttext
+text text text text text text text text text text text text text text text text
+</fo:block>
+
+<fo:block>
+-
+</fo:block>
+
+<fo:block text-align="start" text-indent="30%">
+texttext texttext texttext texttext texttext texttext texttext texttext
+text texttext text texttext text texttext text texttext texttext texttext
+text text text text text text text text text text text text text text text text
+</fo:block>
+
+<fo:block>
+-
+</fo:block>
+
+<fo:block text-align="end" text-indent="15pt">
+<fo:block text-align="start" text-indent="inherit">
+texttext texttext texttext texttext texttext texttext texttext texttext
+text texttext text texttext text texttext text texttext texttext texttext
+text text text text text text text text text text text text text text text text
+</fo:block>
+</fo:block>
+
+<fo:block>
+-
+</fo:block>
+
+<fo:block text-align="end" last-line-end-indent="20%">
+texttext texttext texttext texttext texttext texttext texttext texttext
+text texttext text texttext text texttext text texttext texttext texttext
+text text text text text text text text text text text text text text text text
+</fo:block>
+
+<fo:block>
+-
+</fo:block>
+
+<fo:block text-align="center" last-line-end-indent="40pt">
+texttext texttext texttext texttext texttext texttext texttext texttext
+text texttext text texttext text texttext text texttext texttext texttext
+text text text text text text text text text text text text text text text text
+</fo:block>
+
+<fo:block>
+-
+</fo:block>
+
+<fo:block text-align="justify" last-line-end-indent="20%">
+texttext texttext texttext texttext texttext texttext texttext texttext
+</fo:block>
+
+<fo:block>
+-
+</fo:block>
+
+<fo:block text-align="justify" text-indent="30pt" last-line-end-indent="20%">
+texttext texttext texttext texttext texttext texttext texttext texttext
+</fo:block>
+
+</data>
+</test>
diff --git a/test/xml/bbo1b1.xml b/test/xml/bbo1b1.xml
new file mode 100644
index 000000000..8e428c578
--- /dev/null
+++ b/test/xml/bbo1b1.xml
@@ -0,0 +1,48 @@
+<test xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+<data>
+
+<fo:block>
+This file covers the use of keeps, breaks, orphans and widows. These are items that effect the page breaking.
+</fo:block>
+
+<fo:block space-before.optimum="660pt" break-before="page" break-after="page">
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+</fo:block>
+
+<fo:block keep-together="always" space-before.optimum="660pt" break-after="page">
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+</fo:block>
+
+<fo:block widows="4" space-before.optimum="660pt" break-after="page">
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+text text text text text text text text text text text text text text text text
+</fo:block>
+
+</data>
+</test>