aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSimon Pepping <spepping@apache.org>2006-02-24 11:39:01 +0000
committerSimon Pepping <spepping@apache.org>2006-02-24 11:39:01 +0000
commit3eb942fd361204404fbe7f946ae1c319637e4bf1 (patch)
tree01d290ad096877bcb12e4f45ff218153798bd989 /test
parent799ffca5bbf2939cfe34f723c826f73dcd28138f (diff)
downloadxmlgraphics-fop-3eb942fd361204404fbe7f946ae1c319637e4bf1.tar.gz
xmlgraphics-fop-3eb942fd361204404fbe7f946ae1c319637e4bf1.zip
Avoid a NullPointerException when fo:title is empty.
Let PSLM and ContentLM create LMs via LayoutManagerMaker. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@380646 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/layoutengine/standard-testcases/title_empty.xml45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/layoutengine/standard-testcases/title_empty.xml b/test/layoutengine/standard-testcases/title_empty.xml
new file mode 100644
index 000000000..ba1b0829f
--- /dev/null
+++ b/test/layoutengine/standard-testcases/title_empty.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2005 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks that an empty fo:title does not cause a
+NullPointerException and does not generate any text.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="small"
+ page-height="10cm" page-width="10cm">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <fo:page-sequence master-reference="small">
+ <fo:title/>
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block/>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="" xpath="//title"/>
+ </checks>
+</testcase>