Skip to content

Commit

Permalink
feat: set reported 3.x version to "3.2"
Browse files Browse the repository at this point in the history
Fix #943
  • Loading branch information
rdeltour committed Feb 5, 2019
1 parent 3454da5 commit 9965c19
Show file tree
Hide file tree
Showing 94 changed files with 107 additions and 108 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/adobe/epubcheck/util/EPUBVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

public enum EPUBVersion
{
Unknown("unknown"), VERSION_2("2.0.1"), VERSION_3("3.0.1");
Unknown("unknown"), VERSION_2("2.0.1"), VERSION_3("3.2");

private final String version;

Expand Down
29 changes: 14 additions & 15 deletions src/test/java/com/adobe/epubcheck/ocf/OCFCheckerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ includes the relinquishment of all rights to enforce (by lawsuit
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
Expand All @@ -39,7 +38,6 @@ includes the relinquishment of all rights to enforce (by lawsuit

import com.adobe.epubcheck.messages.MessageId;
import com.adobe.epubcheck.opf.ValidationContext.ValidationContextBuilder;
import com.adobe.epubcheck.test.NoExitSecurityManager;
import com.adobe.epubcheck.util.EPUBVersion;
import com.adobe.epubcheck.util.ValidationReport;
import com.adobe.epubcheck.util.outWriter;
Expand All @@ -48,6 +46,7 @@ public class OCFCheckerTest
{

private Locale defaultLocale;
private static final String VERSION_STRING = "[format version] "+EPUBVersion.VERSION_3;

@Before
public void before() throws Exception
Expand Down Expand Up @@ -116,7 +115,7 @@ public void testLoremBasic30()
assertEquals(0, testReport.getErrorCount());
assertEquals(0, testReport.getWarningCount());

assertTrue(testReport.hasInfoMessage("[format version] 3.0.1"));
assertTrue(testReport.hasInfoMessage(VERSION_STRING));
}

@Test
Expand All @@ -133,7 +132,7 @@ public void testLoremBasic30Against20()
Collections.addAll(warnings, MessageId.PKG_001);
assertEquals(warnings, testReport.getWarningIds());

assertTrue(testReport.hasInfoMessage("[format version] 3.0.1"));
assertTrue(testReport.hasInfoMessage(VERSION_STRING));
assertTrue(testReport
.hasInfoMessage("[unique identifier] urn:uuid:550e8400-e29b-41d4-a716-446667441231"));
}
Expand Down Expand Up @@ -168,7 +167,7 @@ public void testLoremAudio30()
}
assertEquals(0, testReport.getErrorCount());
assertEquals(0, testReport.getWarningCount());
assertTrue(testReport.hasInfoMessage("[format version] 3.0.1"));
assertTrue(testReport.hasInfoMessage(VERSION_STRING));
}

@Test
Expand All @@ -183,7 +182,7 @@ public void testLoremForeign30()
assertEquals(0, testReport.getErrorCount());
assertEquals(0, testReport.getWarningCount());

assertTrue(testReport.hasInfoMessage("[format version] 3.0.1"));
assertTrue(testReport.hasInfoMessage(VERSION_STRING));
}

@Test
Expand All @@ -198,7 +197,7 @@ public void testLoremLink30()
assertEquals(0, testReport.getErrorCount());
assertEquals(0, testReport.getWarningCount());

assertTrue(testReport.hasInfoMessage("[format version] 3.0.1"));
assertTrue(testReport.hasInfoMessage(VERSION_STRING));
}

@Test
Expand All @@ -213,7 +212,7 @@ public void testLoremPoster30()
assertEquals(0, testReport.getErrorCount());
assertEquals(0, testReport.getWarningCount());

assertTrue(testReport.hasInfoMessage("[format version] 3.0.1"));
assertTrue(testReport.hasInfoMessage(VERSION_STRING));
}

@Test
Expand All @@ -228,7 +227,7 @@ public void testLoremSVG30()
assertEquals(0, testReport.getErrorCount());
assertEquals(0, testReport.getWarningCount());

assertTrue(testReport.hasInfoMessage("[format version] 3.0.1"));
assertTrue(testReport.hasInfoMessage(VERSION_STRING));
}

@Test
Expand All @@ -243,7 +242,7 @@ public void testLoremHyperlink30()
assertEquals(0, testReport.getErrorCount());
assertEquals(0, testReport.getWarningCount());

assertTrue(testReport.hasInfoMessage("[format version] 3.0.1"));
assertTrue(testReport.hasInfoMessage(VERSION_STRING));
}

@Test
Expand All @@ -258,7 +257,7 @@ public void testLoremWasteland30()
assertEquals(0, testReport.getErrorCount());
assertEquals(0, testReport.getWarningCount());

assertTrue(testReport.hasInfoMessage("[format version] 3.0.1"));
assertTrue(testReport.hasInfoMessage(VERSION_STRING));
}

@Test
Expand Down Expand Up @@ -324,7 +323,7 @@ public void testInvalidLoremForeign30()
assertEquals(errors, testReport.getErrorIds());
assertEquals(0, testReport.getWarningCount());

assertTrue(testReport.hasInfoMessage("[format version] 3.0.1"));
assertTrue(testReport.hasInfoMessage(VERSION_STRING));
}

@Test
Expand All @@ -342,7 +341,7 @@ public void testInvalidLoremPoster30()
assertEquals(errors, testReport.getErrorIds());
assertEquals(0, testReport.getWarningCount());

assertTrue(testReport.hasInfoMessage("[format version] 3.0.1"));
assertTrue(testReport.hasInfoMessage(VERSION_STRING));
}

@Test
Expand All @@ -360,7 +359,7 @@ public void testInvalidLoremRNG30()
assertEquals(errors, testReport.getErrorIds());
assertEquals(0, testReport.getWarningCount());

assertTrue(testReport.hasInfoMessage("[format version] 3.0.1"));
assertTrue(testReport.hasInfoMessage(VERSION_STRING));
}

@Test
Expand All @@ -383,6 +382,6 @@ public void testInvalidLoremSCH30()
assertEquals(errors, testReport.getErrorIds());
assertEquals(0, testReport.getWarningCount());

assertTrue(testReport.hasInfoMessage("[format version] 3.0.1"));
assertTrue(testReport.hasInfoMessage(VERSION_STRING));
}
}
2 changes: 1 addition & 1 deletion src/test/resources/30/epub/invalid/extension-1.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[creation date] 2011-09-01T17:16:54Z
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/epub/valid/epub30-spec.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[creation date] 2012-02-14T11:20:00Z
[modification date] 2012-02-27T16:38:35Z
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] EPUB 3.0 Specification
[creator] EPUB 3 Working Group
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/epub/valid/font_fallback_chain.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[creation date] 2011-09-01T17:16:54Z
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/epub/valid/issue145.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[creation date] 2011-12-13T18:37:18Z
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Abroad
[creator] Thomas Crane
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/epub/valid/issue158.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[creation date] 2012-02-29T06:12:48Z
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] external resource example epub
[creator] KOJIMA Satoshi
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/epub/valid/lorem.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[creation date] 2011-09-01T17:16:54Z
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/epub/valid/mp3-in-manifest.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[creation date] 2011-09-01T17:16:54Z
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/epub/valid/mp3-with-fallback.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[creation date] 2011-09-01T17:16:54Z
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/epub/valid/test_svg.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[creation date] 2011-09-01T17:16:54Z
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/epub/valid/valid-ncx.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[creation date] 1314890214000
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/expanded/valid/fallback-bindings.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# creation date is not stable between different runs
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# creation date is not stable between different runs
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/expanded/valid/fallbacks.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# creation date is not stable between different runs
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/expanded/valid/issue267.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# creation date is not stable between different runs
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] My Main Title
[title] First Subtitle
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/expanded/valid/lorem-audio.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# creation date is not stable between different runs
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/expanded/valid/lorem-basic-dual.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# creation date is not stable between different runs
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/expanded/valid/lorem-basic.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# creation date is not stable between different runs
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/expanded/valid/lorem-css-import.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# creation date is not stable between different runs
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/expanded/valid/lorem-foreign.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# creation date is not stable between different runs
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/expanded/valid/lorem-link.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# creation date is not stable between different runs
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/expanded/valid/lorem-poster.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# creation date is not stable between different runs
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/expanded/valid/lorem-remote.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# creation date is not stable between different runs
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/expanded/valid/lorem-svg-dual.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# creation date is not stable between different runs
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# creation date is not stable between different runs
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/expanded/valid/lorem-svg.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# creation date is not stable between different runs
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/expanded/valid/svg-cover.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# creation date is not stable between different runs
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] Lorem Ipsum
[language] la
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/expanded/valid/svg-in-spine.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# creation date is not stable between different runs
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] SVG in Spine
[creator] EPUB Sample project
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/expanded/valid/wasteland-basic.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# creation date is not stable between different runs
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] The Waste Land
[creator] T.S. Eliot
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/30/expanded/valid/wasteland-otf.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# creation date is not stable between different runs
[format version] 3.0.1
[format version] 3.2
[format name] application/epub+zip
[title] The Waste Land
[creator] T.S. Eliot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"renditionLayout" : "reflowable",
"renditionOrientation" : "auto",
"renditionSpread" : "auto",
"ePubVersion" : "3.0.1",
"ePubVersion" : "3.2",
"isScripted" : false,
"hasFixedFormat" : false,
"isBackwardCompatible" : true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"renditionLayout" : "reflowable",
"renditionOrientation" : "auto",
"renditionSpread" : "auto",
"ePubVersion" : "3.0.1",
"ePubVersion" : "3.2",
"isScripted" : false,
"hasFixedFormat" : false,
"isBackwardCompatible" : true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"renditionLayout" : "reflowable",
"renditionOrientation" : "auto",
"renditionSpread" : "auto",
"ePubVersion" : "3.0.1",
"ePubVersion" : "3.2",
"isScripted" : false,
"hasFixedFormat" : false,
"isBackwardCompatible" : true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Start command_line test('severity_overrideBadMessage')
ERROR(CHK-004): ./com/adobe/epubcheck/test/command_line/severity(1,0): The custom message contains too many parameters in message overrides file './com/adobe/epubcheck/test/command_line/severity_overrideBadMessage.txt'.
ERROR(CHK-005): ./com/adobe/epubcheck/test/command_line/severity(2,0): The custom suggestion contains too many parameters in message overrides file './com/adobe/epubcheck/test/command_line/severity_overrideBadMessage.txt'.
Validating using EPUB version 3.0.1 rules.
Validating using EPUB version 3.2 rules.
ERROR(CSS-001): ./com/adobe/epubcheck/test/command_line/severity.epub/OPS/style_tag_css.xhtml(27,13): The 'unicode-bidi' property must not be included in an EPUB Style Sheet.
WARNING(CSS-006): ./com/adobe/epubcheck/test/command_line/severity.epub/OPS/style_tag_css.xhtml(38,13): CSS position:fixed property should not be used in EPUBs.
ERROR(CSS-001): ./com/adobe/epubcheck/test/command_line/severity.epub/OPS/inline_css.xhtml(14,1): The 'unicode-bidi' property must not be included in an EPUB Style Sheet.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
xmlns:stFnt="http://ns.adobe.com/xap/1.0/sType/Font#"
xmlns:xmp="http://ns.adobe.com/xap/1.0/"
xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/"
dc:format="application/epub+zip;version=3.0.1"
dc:format="application/epub+zip;version=3.2"
dc:identifier="000000000000000000"
dc:language="en"
extended-properties:Characters="648"
Expand Down
Loading

0 comments on commit 9965c19

Please sign in to comment.