blob: 42bd51d87c26eeeb69fd7bfa056adf767a63af8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
<?xml version="1.0"?>
<!-- =========================================================================== -->
<project default="creating new test pdf files" basedir=".">
<!-- =================================================================== -->
<!-- Initialization target -->
<!-- =================================================================== -->
<target name="init">
<tstamp/>
<mkdir dir="tests"/>
<property name="referenceDir" value="reference"/>
<property name="testDir" value="tests"/>
<property name="foDir" value="fo"/>
<taskdef name="fop" classname="Fop"/>
<taskdef name="compare" classname="Compare"/>
</target>
<!-- =================================================================== -->
<!-- Help on usage -->
<!-- =================================================================== -->
<target name="usage">
<echo message=""/>
<echo message=""/>
<echo message="USAGE of runtests"/>
<echo message="-------------------------------------------------------------"/>
<echo message=""/>
<echo message=" available targets are:"/>
<echo message=""/>
<echo message=" compare --> generates new pdf test files and compares them to reference files (default)"/>
<echo message=" reference --> generates new reference pdf files"/>
<echo message=" See the comments inside the build.xml file for more details."/>
<echo message="-------------------------------------------------------------"/>
<echo message=""/>
<echo message=""/>
</target>
<!-- =================================================================== -->
<!-- Produces new test pdf files -->
<!-- =================================================================== -->
<target name="creating new test pdf files" depends="init">
<fop fofile="${foDir}/normal.fo" pdffile="${testDir}/normal.pdf"/>
<fop fofile="${foDir}/table.fo" pdffile="${testDir}/table.pdf"/>
<fop fofile="${foDir}/list.fo" pdffile="${testDir}/list.pdf"/>
<fop fofile="${foDir}/link.fo" pdffile="${testDir}/link.pdf"/>
<fop fofile="${foDir}/border.fo" pdffile="${testDir}/border.pdf"/>
<fop fofile="${foDir}/extensive.fo" pdffile="${testDir}/extensive.pdf"/>
<fop fofile="${foDir}/images.fo" pdffile="${testDir}/images.pdf"/>
<fop fofile="${foDir}/readme.fo" pdffile="${testDir}/readme.pdf"/>
<fop fofile="${foDir}/fonts.fo" pdffile="${testDir}/fonts.pdf"/>
<fop fofile="${foDir}/leader.fo" pdffile="${testDir}/leader.pdf"/>
<fop fofile="${foDir}/textdeko.fo" pdffile="${testDir}/textdeko.pdf"/>
<fop fofile="${foDir}/inhprop.fo" pdffile="${testDir}/inhprop.pdf"/>
<fop fofile="${foDir}/normalex.fo" pdffile="${testDir}/normalex.pdf"/>
<fop fofile="${foDir}/simple.fo" pdffile="${testDir}/simple.pdf"/>
<fop fofile="${foDir}/hyphen.fo" pdffile="${testDir}/hyphen.pdf"/>
<fop fofile="${foDir}/character.fo" pdffile="${testDir}/character.pdf"/>
</target>
<target name="image" depends="init">
<fop fofile="${foDir}/images.fo" pdffile="${testDir}/images.pdf"/>
</target>
<!-- =================================================================== -->
<!-- Compares new test pdf files to reference pdf files -->
<!-- =================================================================== -->
<target name="compare" depends ="creating new test pdf files">
<compare referenceDirectory = "${referenceDir}"
testDirectory = "${testDir}"
filenames = "normal.pdf,table.pdf,list.pdf,link.pdf,border.pdf,images.pdf,extensive.pdf,readme.pdf,fonts.pdf,list2.pdf"/>
</target>
<!-- =================================================================== -->
<!-- Produces new reference pdf files -->
<!-- =================================================================== -->
<target name="reference">
<fop fofile="${foDir}/normal.fo" pdffile="${referenceDir}/normal.pdf"/>
<fop fofile="${foDir}/table.fo" pdffile="${referenceDir}/table.pdf"/>
<fop fofile="${foDir}/list.fo" pdffile="${referenceDir}/list.pdf"/>
<fop fofile="${foDir}/link.fo" pdffile="${referenceDir}/link.pdf"/>
<fop fofile="${foDir}/border.fo" pdffile="${referenceDir}/border.pdf"/>
<fop fofile="${foDir}/extensive.fo" pdffile="${referenceDir}/extensive.pdf"/>
<fop fofile="${foDir}/images.fo" pdffile="${referenceDir}/images.pdf"/>
<fop fofile="${foDir}/readme.fo" pdffile="${referenceDir}/readme.pdf"/>
<fop fofile="${foDir}/fonts.fo" pdffile="${referenceDir}/fonts.pdf"/>
<fop fofile="${foDir}/leader.fo" pdffile="${referenceDir}/leader.pdf"/>
<fop fofile="${foDir}/textdeko.fo" pdffile="${referenceDir}/textdeko.pdf"/>
<fop fofile="${foDir}/inhprop.fo" pdffile="${referenceDir}/inhprop.pdf"/>
<fop fofile="${foDir}/normalex.fo" pdffile="${referenceDir}/normalex.pdf"/>
<fop fofile="${foDir}/simple.fo" pdffile="${referenceDir}/simple.pdf"/>
<fop fofile="${foDir}/hyphen.fo" pdffile="${referenceDir}/hyphen.pdf"/>
<fop fofile="${foDir}/character.fo" pdffile="${referenceDir}/character.pdf"/>
</target>
<!-- =================================================================== -->
<!-- Starts the test -->
<!-- =================================================================== -->
<target name="runtest" depends="compare">
<echo message="Running Fop tests"/>
</target>
<!-- =================================================================== -->
<!-- Clean targets -->
<!-- =================================================================== -->
<target name="clean" depends="init">
<deltree dir="${build.dir}"/>
</target>
</project>
<!-- End of file -->
|