From 2809c23f9238bfc933d17ef430e13e8ced850b19 Mon Sep 17 00:00:00 2001 From: Romain Deltour Date: Mon, 5 Dec 2022 10:12:53 +0100 Subject: [PATCH] test: do not use file names with illegal characters in tests File names with EPUB-illegal characters are also NTFS-invalid names, so they can cause issues (cannot be easily checked out by git on Windows or may cause runtime issues on NTFS). This commit replaces the expanded EPUBs in invalid characters by tests by packaged EPUBs. Fix #1420. --- .../ocf-filename-character-forbidden-error.epub | Bin 0 -> 1506 bytes .../EPUB/content_|.xhtml | 11 ----------- .../EPUB/nav.xhtml | 14 -------------- .../EPUB/package.opf | 16 ---------------- .../META-INF/container.xml | 6 ------ .../mimetype | 1 - ...orbidden-non-publication-resource-error.epub | Bin 0 -> 1620 bytes .../EPUB/content_001.xhtml | 11 ----------- .../EPUB/nav.xhtml | 14 -------------- .../EPUB/package.opf | 16 ---------------- .../META-INF/container.xml | 6 ------ .../META-INF/file_<>.txt | 0 .../mimetype | 1 - src/test/resources/epub3/04-ocf/ocf.feature | 4 ++-- 14 files changed, 2 insertions(+), 98 deletions(-) create mode 100644 src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error.epub delete mode 100644 src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/EPUB/content_|.xhtml delete mode 100644 src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/EPUB/nav.xhtml delete mode 100644 src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/EPUB/package.opf delete mode 100644 src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/META-INF/container.xml delete mode 100644 src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/mimetype create mode 100644 src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error.epub delete mode 100644 src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/EPUB/content_001.xhtml delete mode 100644 src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/EPUB/nav.xhtml delete mode 100644 src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/EPUB/package.opf delete mode 100644 src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/META-INF/container.xml delete mode 100644 src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/META-INF/file_<>.txt delete mode 100644 src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/mimetype diff --git a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error.epub b/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error.epub new file mode 100644 index 0000000000000000000000000000000000000000..34ee4171036e06490a8cbbdf1c84c53d450f9cf5 GIT binary patch literal 1506 zcmWIWW@h1HU}9ikSXf~T3+};|h$*s6@4N%7usBYJQP$&K5{JfIXyps4Dy^4&I+#K6}L;fZM zk(TtIqFZ;H9C7t{sbDlCBjv)ujb2NAZ#lg%K3bozdF*A}yM5IsFMfR(6#L${S4HBi zkQMi=o^9)n2qkE6e7v{3ZuYli_f0nEPnsB4v~iuy4Npom{1vYg8K_wyUEV zzn??r{SUX^7<6)KTxgm*HMA`|#C*H0YPa~WC*K?Feti=zoVhXhzI3X!_$8ex=G8l{ zo!}@bxm2()*sCofK8vwu_C8eK6>+;UJ^=d6i;;nW4@iT3mzP)u@mJ`C-Fb%%cwEz; zYlkq(W?Q|TaBIPqC9=OIc9m#}ME9|rn3QN-`04x9r3)OEdrxTJqw?|H)8zkO|NcD1 z!|RtW03}@kbY<5@e6u7C%W|CcHS`T^gg}+dD5+ryAzBo_Pww4EZn?x z?T=%13(ifQu#}5s*Dm8H(^Pey^`A7o6QbUF{p<3$MG0G^y&_s46lCPbIn?Kq3io_So1b+(aFM8pyMz(gXp<=UMfb)&%A6Rn|3^Nut|0_P>YdiBt>3uim zVDFrZMuih1XL&B;44h%bFA^n^;?<$PV&2J#SJzflMBm}!3p`<)*YUX_b7?O?J*)uN(9lD5JB+51cV#MdegvE1puh1TDT*N-v>cr!A|G2iEe1g!c0?avJy-2wRSvR&QMd;qnj4Ofzyjj^m>R5r$4CuaT HEFc~Ln=M9u literal 0 HcmV?d00001 diff --git a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/EPUB/content_|.xhtml b/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/EPUB/content_|.xhtml deleted file mode 100644 index ea29a1610..000000000 --- a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/EPUB/content_|.xhtml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Minimal EPUB - - -

Loomings

-

Call me Ishmael.

- - diff --git a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/EPUB/nav.xhtml b/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/EPUB/nav.xhtml deleted file mode 100644 index 508931b93..000000000 --- a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/EPUB/nav.xhtml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - Minimal Nav - - - - - diff --git a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/EPUB/package.opf b/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/EPUB/package.opf deleted file mode 100644 index ffb6b06a0..000000000 --- a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/EPUB/package.opf +++ /dev/null @@ -1,16 +0,0 @@ - - - - Minimal EPUB 3.0 - en - NOID - 2017-06-14T00:00:01Z - - - - - - - - - \ No newline at end of file diff --git a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/META-INF/container.xml b/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/META-INF/container.xml deleted file mode 100644 index 318782179..000000000 --- a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/META-INF/container.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/mimetype b/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/mimetype deleted file mode 100644 index 57ef03f24..000000000 --- a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-error/mimetype +++ /dev/null @@ -1 +0,0 @@ -application/epub+zip \ No newline at end of file diff --git a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error.epub b/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error.epub new file mode 100644 index 0000000000000000000000000000000000000000..bd450d36d383cabf4215d6e7dac1270802f365f4 GIT binary patch literal 1620 zcmWIWW@h1HU}9ikNUm!Q%}-pdBLZZDFb5FlX6B}rR2HNr78K-UCMT9;=I80B7L+Dw zS7jCi0CkE0b#j1phJSTTxChkX#mKoDLMIsJA65`(O@AIP z@a@-}l8oHBk+=GMtxH~p2uic7@SNCp|I+z>8&Geh`h#7jTj z@V?Far{54+G4;)2F$=9pYc3bf65aa8=kQ_U_7Fwqu+H+wXEb!JPjEYJOR~Q6`{Rq> z(TnEp*-*N?Ezfc5oSN;=jx=re-EDHj)#Igt(Tt3g3kNrPE%m+S^uqXPeZJxQ2qD+IGbuBFqS6(6O91Oe+7xj*@@|?die!uy+PjoEd~Pn zerwO#DU}iUSc++egz3izj~9sRFI#x{olDfN3$=f%+jpH#vz=L>G55V?z@5BY?Q1vq zuj~}s6w>GrUfy|c21dnR!#Ns>@BaKe{xzm z^Gyx2`_9vWeVUc4-7QNL!uqCZ`u|e|0+}A*)k2 zN{!FR+xVo3B3JP9MyKv3AI^^~SB)(!W!TQ6i`_u-ed_V&-Z zcgcKw`t_xqQ~zQPxn}PB<#N9_Xdk@7SZ)1eTKEYG=Burz(mHqfZCYKv^wYsVF;qu~cMx%s+=IO=-(x#@$FTw-QkYLQ+=Zcc39L9Rmv0xsvjX&;JP>Xt7w zi>qm#?F;rbFT - - - - Minimal EPUB - - -

Loomings

-

Call me Ishmael.

- - diff --git a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/EPUB/nav.xhtml b/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/EPUB/nav.xhtml deleted file mode 100644 index 240745e63..000000000 --- a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/EPUB/nav.xhtml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - Minimal Nav - - - - - diff --git a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/EPUB/package.opf b/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/EPUB/package.opf deleted file mode 100644 index 0d1eec6e9..000000000 --- a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/EPUB/package.opf +++ /dev/null @@ -1,16 +0,0 @@ - - - - Minimal EPUB 3.0 - en - NOID - 2017-06-14T00:00:01Z - - - - - - - - - \ No newline at end of file diff --git a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/META-INF/container.xml b/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/META-INF/container.xml deleted file mode 100644 index 318782179..000000000 --- a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/META-INF/container.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/META-INF/file_<>.txt b/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/META-INF/file_<>.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/mimetype b/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/mimetype deleted file mode 100644 index 57ef03f24..000000000 --- a/src/test/resources/epub3/04-ocf/files/ocf-filename-character-forbidden-non-publication-resource-error/mimetype +++ /dev/null @@ -1 +0,0 @@ -application/epub+zip \ No newline at end of file diff --git a/src/test/resources/epub3/04-ocf/ocf.feature b/src/test/resources/epub3/04-ocf/ocf.feature index ede13d575..a8bf1c50a 100644 --- a/src/test/resources/epub3/04-ocf/ocf.feature +++ b/src/test/resources/epub3/04-ocf/ocf.feature @@ -58,13 +58,13 @@ Feature: EPUB 3 — Open Container Format @spec @xref:sec-container-filenames Scenario: Report forbidden characters in file names - When checking EPUB 'ocf-filename-character-forbidden-error' + When checking EPUB 'ocf-filename-character-forbidden-error.epub' Then error PKG-009 is reported And no other errors or warnings are reported @spec @xref:sec-container-filenames Scenario: Report forbidden characters in file names even for non-publication resources - When checking EPUB 'ocf-filename-character-forbidden-non-publication-resource-error' + When checking EPUB 'ocf-filename-character-forbidden-non-publication-resource-error.epub' Then error PKG-009 is reported And no other errors or warnings are reported