Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test for OCF different compression #188

Merged
merged 2 commits into from
Aug 2, 2022
Merged

add test for OCF different compression #188

merged 2 commits into from
Aug 2, 2022

Conversation

Jeffxz
Copy link
Contributor

@Jeffxz Jeffxz commented Aug 1, 2022

Add test for #185

Used bzip2 for compression

zip -rX -Z bzip2 ../ocf-zip-comp.epub mimetype META-INF EPUB
  adding: mimetype (stored 0%)
  adding: META-INF/ (stored 0%)
  adding: META-INF/container.xml (bzipped 11%)
  adding: EPUB/ (stored 0%)
  adding: EPUB/content_001.xhtml (bzipped 19%)
  adding: EPUB/nav.xhtml (bzipped 22%)
  adding: EPUB/package.opf (bzipped 46%)

Extracted folder was tested by epubcheck. Zipped file raised compression error via epub check

Add test for #185

Used bzip2 for compression

zip -rX -Z bzip2 ../ocf-zip-comp.epub mimetype META-INF EPUB
@Jeffxz
Copy link
Contributor Author

Jeffxz commented Aug 1, 2022

Will send PR to epub-specs after this one got merged

<dc:creator>Zheng Xu</dc:creator>
<dc:date>2022-07-30</dc:date>
<dc:description>MUST treat any OCF ZIP container that uses compression techniques other than Deflate as in error.</dc:description>
<dc:identifier id="pub-id">ocf-zip-comp</dc:identifier>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor knit: can you align the entry to the left with the rest of the items? Thx.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thnx, updated

<title>OCF ZIP container uses compression techniques other than Deflate</title>
</head>
<body>
<p>Test passes if reading system raises error when loading this epub file and this page of the book can not be accessed.</p>
Copy link
Member

@iherman iherman Aug 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I am being overly picky here...).

Very strictly speaking, we do not define what the RS' error behaviour is. It is conceivable that a RS, whilst reporting an error, makes an attempt to display the content nevertheless. This should be acceptable (while making it clear that this is an erroneous EPUB).

Suggested change
<p>Test passes if reading system raises error when loading this epub file and this page of the book can not be accessed.</p>
<p>Test passes if reading system raises error when loading this epub file.</p>

Note that the same change should be made on the ocf-zip-mult test, too. My apologies not to have realized that before.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no problem. Thanks, I will make changes to both.

forgot attaching epub file
@iherman
Copy link
Member

iherman commented Aug 2, 2022

@Jeffxz as far as I see, this is now done and can be merged, correct? If true, I will merge it and you should create a PR for the references in the spec.

Thanks!

@Jeffxz
Copy link
Contributor Author

Jeffxz commented Aug 2, 2022

thanks @iherman. ready to merge. I am going to send PR to spec now.

Jeffxz added a commit to Jeffxz/epub-specs that referenced this pull request Aug 2, 2022
@iherman iherman merged commit 741e495 into w3c:main Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants