aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2008-12-22 18:23:03 +0000
committerJeremias Maerki <jeremias@apache.org>2008-12-22 18:23:03 +0000
commit45ff1920e231e991b667712983c6f1523d7a5179 (patch)
tree66ff647379f7a576eb5ccd863e99ad1caedd8b3d /test
parent10cb96278c0b8447ee82070ddfdce5255eea80e3 (diff)
downloadxmlgraphics-fop-45ff1920e231e991b667712983c6f1523d7a5179.tar.gz
xmlgraphics-fop-45ff1920e231e991b667712983c6f1523d7a5179.zip
Most of the PostScript extensions are implemented in PSPainter now (and tested).
Bugfix: IFSerializer wrote out the page name instead of the page-master-name for the page-master-name attribute. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@728737 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/layoutengine/standard-testcases/ps-extension_1.xml18
-rw-r--r--test/layoutengine/standard-testcases/ps-extension_2.xml29
2 files changed, 47 insertions, 0 deletions
diff --git a/test/layoutengine/standard-testcases/ps-extension_1.xml b/test/layoutengine/standard-testcases/ps-extension_1.xml
index 83459c959..784a87c4d 100644
--- a/test/layoutengine/standard-testcases/ps-extension_1.xml
+++ b/test/layoutengine/standard-testcases/ps-extension_1.xml
@@ -65,4 +65,22 @@
<eval expected="bla" xpath="/areaTree/pageSequence/pageViewport[@nr=2]/page/extension-attachments/child::*[2]/@name"/>
<eval expected="%FOPTestPSPageSetupCode: Blah blah!" xpath="/areaTree/pageSequence/pageViewport[@nr=2]/page/extension-attachments/child::*[2]"/>
</checks>
+ <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate">
+ <eval expected="3" xpath="count(/if:document/if:header/child::*)"/>
+ <eval expected="%FOPTestPSSetupCode: General setup code here!" xpath="/if:document/if:header/child::*[1]"/>
+ <true xpath="contains(/if:document/if:header/child::*[2], '%FOPTestPSSetupCode: Line 1')"/>
+ <eval expected="multi-line" xpath="/if:document/if:header/child::*[2]/@name"/>
+
+ <eval expected="2" xpath="count(//if:page[@index=0]/if:page-header/child::*)"/>
+ <eval expected="media-dict" xpath="//if:page[@index=0]/if:page-header/child::*[1]/@name"/>
+ <eval expected="%FOPTestPSPageSetupCode: MediaDict!" xpath="//if:page[@index=0]/if:page-header/child::*[1]"/>
+ <eval expected="bla" xpath="//if:page[@index=0]/if:page-header/child::*[2]/@name"/>
+ <eval expected="%FOPTestPSPageSetupCode: Blah blah!" xpath="//if:page[@index=0]/if:page-header/child::*[2]"/>
+
+ <eval expected="2" xpath="count(//if:page[@index=1]/if:page-header/child::*)"/>
+ <eval expected="media-dict" xpath="//if:page[@index=1]/if:page-header/child::*[1]/@name"/>
+ <eval expected="%FOPTestPSPageSetupCode: MediaDict!" xpath="//if:page[@index=1]/if:page-header/child::*[1]"/>
+ <eval expected="bla" xpath="//if:page[@index=1]/if:page-header/child::*[2]/@name"/>
+ <eval expected="%FOPTestPSPageSetupCode: Blah blah!" xpath="//if:page[@index=1]/if:page-header/child::*[2]"/>
+ </if-checks>
</testcase>
diff --git a/test/layoutengine/standard-testcases/ps-extension_2.xml b/test/layoutengine/standard-testcases/ps-extension_2.xml
index 9fadd9845..7b886e09c 100644
--- a/test/layoutengine/standard-testcases/ps-extension_2.xml
+++ b/test/layoutengine/standard-testcases/ps-extension_2.xml
@@ -92,4 +92,33 @@
<eval expected="A4 before page" xpath="/areaTree/pageSequence/pageViewport[@simple-page-master-name='A4' and @nr=3]/page/extension-attachments/child::*[2]"/>
<eval expected="A4 after page" xpath="/areaTree/pageSequence/pageViewport[@simple-page-master-name='A4' and @nr=3]/page/extension-attachments/child::*[3]"/>
</checks>
+ <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate">
+ <eval expected="1" xpath="count(/if:document/if:page-sequence)"/>
+ <eval expected="6" xpath="count(/if:document/if:header/child::*)"/>
+ <eval expected="autofeed" xpath="/if:document/if:header/child::*[1]/@name"/>
+ <eval expected="header comment 1" xpath="/if:document/if:header/child::*[2]/text()"/>
+ <eval expected="footer comment 1" xpath="/if:document/if:header/child::*[3]/text()"/>
+ <eval expected="header comment 2" xpath="/if:document/if:header/child::*[4]/text()"/>
+ <eval expected="footer comment 2" xpath="/if:document/if:header/child::*[5]/text()"/>
+
+ <eval expected="3" xpath="count(//if:page[@index=0]/if:page-header/child::*)"/>
+ <eval expected="A4" xpath="//if:page[@index=0]/@page-master-name"/>
+ <eval expected="lower tray" xpath="//if:page[@index=0]/if:page-header/child::*[1]/@name"/>
+ <eval expected="A4 before page" xpath="//if:page[@index=0]/if:page-header/child::*[2]"/>
+ <eval expected="A4 after page" xpath="//if:page[@index=0]/if:page-header/child::*[3]"/>
+
+ <eval expected="5" xpath="count(//if:page[@index=1]/if:page-header/child::*)"/>
+ <eval expected="A4a" xpath="//if:page[@index=1]/@page-master-name"/>
+ <eval expected="upper tray" xpath="//if:page[@index=1]/if:page-header/child::*[1]/@name"/>
+ <eval expected="A4a before page 1" xpath="//if:page[@index=1]/if:page-header/child::*[2]"/>
+ <eval expected="A4a after page 1" xpath="//if:page[@index=1]/if:page-header/child::*[3]"/>
+ <eval expected="A4a before page 2" xpath="//if:page[@index=1]/if:page-header/child::*[4]"/>
+ <eval expected="A4a after page 2" xpath="//if:page[@index=1]/if:page-header/child::*[5]"/>
+
+ <eval expected="3" xpath="count(//if:page[@index=2]/if:page-header/child::*)"/>
+ <eval expected="A4" xpath="//if:page[@index=2]/@page-master-name"/>
+ <eval expected="lower tray" xpath="//if:page[@index=2]/if:page-header/child::*[1]/@name"/>
+ <eval expected="A4 before page" xpath="//if:page[@index=2]/if:page-header/child::*[2]"/>
+ <eval expected="A4 after page" xpath="//if:page[@index=2]/if:page-header/child::*[3]"/>
+ </if-checks>
</testcase>