Skip to content

Commit

Permalink
Adds test for border alignment (closes #33)
Browse files Browse the repository at this point in the history
  • Loading branch information
bertfrees authored and Joel Håkansson committed Nov 17, 2017
1 parent 26d5631 commit 3f7c337
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/org/daisy/dotify/engine/impl/TakenFromDP2Test.java
Expand Up @@ -371,4 +371,9 @@ public void testManualAndAutomaticVolumeBreaking() throws LayoutEngineException,
testPEF("resource-files/dp2/manual-and-automatic-volume-breaking-input.obfl",
"resource-files/dp2/manual-and-automatic-volume-breaking-expected.pef", false);
}
@Test
public void testMarginRegionAndBorder() throws LayoutEngineException, IOException, PagedMediaWriterConfigurationException {
testPEF("resource-files/dp2/margin-region-and-border-input.obfl",
"resource-files/dp2/margin-region-and-border-expected.pef", true);
}
}
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<pef xmlns="http://www.daisy.org/ns/2008/pef" version="2008-1">
<head>
<meta>
<dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">margin-region-and-border</dc:title>
<dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">Tests combination of a left aligned margin-region and a border.</dc:description>
<dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">application/x-pef+xml</dc:format>
</meta>
</head>
<body>
<volume cols="19" rows="5" rowgap="0" duplex="true">
<section>
<page>
<row>⠀⠀⠏⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠹</row>
<row>⠀⠀⠇⠀⠀⠀⠀⠀⠿⠿⠿⠿⠿⠀⠀⠀⠀⠀⠸</row>
<row>⠀⠀⠧⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠼</row>
</page>
</section>
</volume>
</body>
</pef>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<obfl xmlns="http://www.daisy.org/ns/2011/obfl" version="2011-1" xml:lang="und" hyphenate="false">
<meta>
<dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">margin-region-and-border</dc:title>
<dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">Tests combination of a left aligned margin-region and a border.</dc:description>
</meta>
<layout-master name="master" duplex="true" page-width="19" page-height="5">
<default-template>
<header/>
<footer/>
<margin-region align="left" width="2">
<indicators/>
</margin-region>
</default-template>
</layout-master>
<sequence master="master">
<block border-left-style="solid" border-left-align="outer" border-right-style="solid" border-right-align="outer" border-top-style="solid" border-top-align="outer" border-bottom-style="solid" border-bottom-align="outer" align="center">⠿⠿⠿⠿⠿
</block>
</sequence>
</obfl>

0 comments on commit 3f7c337

Please sign in to comment.