aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2010-04-09 16:09:57 +0000
committerVincent Hennebert <vhennebert@apache.org>2010-04-09 16:09:57 +0000
commit8f6b532710381d795a1cb84d0a2af7b447db74f4 (patch)
treeb7ea4324bfddd198a36a813d7015a33c0b7fbe1f /test
parent83f36b614c3f1f1a866ff70fe9363cd5be31e986 (diff)
downloadxmlgraphics-fop-8f6b532710381d795a1cb84d0a2af7b447db74f4.tar.gz
xmlgraphics-fop-8f6b532710381d795a1cb84d0a2af7b447db74f4.zip
Split catch-all EventFormatter.xml message file into individual files for each EventProducer. There is no longer a default EventModelFactory
Added test case for font event git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@932481 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/events/font.fo14
-rw-r--r--test/java/org/apache/fop/events/EventProcessingTestCase.java7
2 files changed, 21 insertions, 0 deletions
diff --git a/test/events/font.fo b/test/events/font.fo
new file mode 100644
index 000000000..551527522
--- /dev/null
+++ b/test/events/font.fo
@@ -0,0 +1,14 @@
+<?xml version="1.0" standalone="no"?>
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="page"
+ page-height="420pt" page-width="320pt" margin="10pt">
+ <fo:region-body background-color="#F0F0F0"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="page">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block font-family="blah">This block uses an unknown font.</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+</fo:root>
diff --git a/test/java/org/apache/fop/events/EventProcessingTestCase.java b/test/java/org/apache/fop/events/EventProcessingTestCase.java
index cf23c1dab..c1fc757a8 100644
--- a/test/java/org/apache/fop/events/EventProcessingTestCase.java
+++ b/test/java/org/apache/fop/events/EventProcessingTestCase.java
@@ -43,6 +43,7 @@ import org.apache.fop.apps.FopFactory;
import org.apache.fop.area.AreaEventProducer;
import org.apache.fop.fo.FOValidationEventProducer;
import org.apache.fop.fo.flow.table.TableEventProducer;
+import org.apache.fop.fonts.FontEventProducer;
import org.apache.fop.layoutmgr.BlockLevelEventProducer;
import org.apache.fop.layoutmgr.inline.InlineLevelEventProducer;
@@ -109,6 +110,12 @@ public class EventProcessingTestCase extends TestCase {
InlineLevelEventProducer.class.getName() + ".lineOverflows");
}
+ public void testFont() throws FOPException, TransformerException {
+ doTest("font.fo",
+ FontEventProducer.class.getName() + ".fontSubstituted");
+ }
+
+
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTestSuite(EventProcessingTestCase.class);