aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/java/org/apache/fop/traits/BorderPropsTestCase.java7
-rw-r--r--test/layoutengine/standard-testcases/leader_leader-pattern_use-content.xml8
2 files changed, 15 insertions, 0 deletions
diff --git a/test/java/org/apache/fop/traits/BorderPropsTestCase.java b/test/java/org/apache/fop/traits/BorderPropsTestCase.java
index 6aea38512..0c08e05af 100644
--- a/test/java/org/apache/fop/traits/BorderPropsTestCase.java
+++ b/test/java/org/apache/fop/traits/BorderPropsTestCase.java
@@ -24,6 +24,8 @@ import java.awt.Color;
import junit.framework.TestCase;
import org.apache.fop.fo.Constants;
+import org.apache.fop.util.CMYKColorSpace;
+import org.apache.fop.util.ColorExt;
import org.apache.fop.util.ColorUtil;
/**
@@ -46,6 +48,11 @@ public class BorderPropsTestCase extends TestCase {
BorderProps b2 = BorderProps.valueOf(null, ser);
assertEquals(b1, b2);
+ float[] cmyk = new float[] {1.0f, 1.0f, 0.5f, 1.0f};
+ CMYKColorSpace cmykCs = CMYKColorSpace.getInstance();
+ float[] rgb = cmykCs.toRGB(cmyk);
+ col = ColorExt.createFromFoRgbIcc(rgb[0], rgb[1], rgb[2],
+ null, "#CMYK", cmykCs, cmyk);
b1 = new BorderProps(Constants.EN_INSET, 9999,
col, BorderProps.SEPARATE);
ser = b1.toString();
diff --git a/test/layoutengine/standard-testcases/leader_leader-pattern_use-content.xml b/test/layoutengine/standard-testcases/leader_leader-pattern_use-content.xml
index c98bd4511..2a5c72c14 100644
--- a/test/layoutengine/standard-testcases/leader_leader-pattern_use-content.xml
+++ b/test/layoutengine/standard-testcases/leader_leader-pattern_use-content.xml
@@ -69,6 +69,10 @@
</fo:instream-foreign-object></fo:leader>
Content is svg 20 x 10 which is wider than the leader-length
</fo:block>
+ <fo:block>
+ <fo:leader leader-length="36pt" leader-pattern="use-content"> </fo:leader>
+ Content is " "
+ </fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
@@ -172,5 +176,9 @@
<eval expected="0" xpath="//flow/block[7]/lineArea/inlineparent/inlineparent[1]/@offset"/>
<eval expected="20000" xpath="//flow/block[7]/lineArea/inlineparent/inlineparent[1]/viewport/@ipd"/>
<eval expected="-1384" xpath="//flow/block[7]/lineArea/inlineparent/inlineparent[1]/viewport/@offset"/>
+
+ <eval expected="11100" xpath="//flow/block[8]/lineArea/@bpd"/>
+ <eval expected="36000" xpath="//flow/block[8]/lineArea/space[1]/@ipd"/>
+ <eval expected="0" xpath="//flow/block[8]/lineArea/space[1]/@offset"/>
</checks>
</testcase>