From e3136c33eaa9477a2eb6789a962f8a1c9e102415 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 21 Dec 2017 23:46:16 +0100 Subject: [PATCH] m.images: test with a file that has no EXIF data whatsoever. Crashes. Wtf, I thought this is already handled. --- pelican-plugins/m/test/images/noexif.jpg | Bin 0 -> 714 bytes pelican-plugins/m/test/images/page.html | 14 ++++++++++---- pelican-plugins/m/test/images/page.rst | 4 +++- pelican-plugins/m/test/test_images.py | 7 ++++++- 4 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 pelican-plugins/m/test/images/noexif.jpg diff --git a/pelican-plugins/m/test/images/noexif.jpg b/pelican-plugins/m/test/images/noexif.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3d0805cacb23579be6b86ba38f5259b19fcff5ed GIT binary patch literal 714 zcmex=5A1R0qH8UG()kY`|EWMu>c1}I=;VrF4wW9Q)H;sz?%D!{d!pzFb!U9xX z3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~nmD<{#3dx9RMpfqG__1j z&CD$#!{aTy>F&MvI1{&TO53h+-Pr9jn=(t?`-$_6XU+V&w=#B`#H5VILtZ*D z?6R|$*KNI-X(pw&GxHm_F5kJ!Z}g-p^#uDqo;Ydiaju{|d2RgsL-!cxRjU4W`Iw({ YFQ&L9^yE3FZ_Jms>SgTpIsgAA0JEa}BLDyZ literal 0 HcmV?d00001 diff --git a/pelican-plugins/m/test/images/page.html b/pelican-plugins/m/test/images/page.html index 8f1b0722..005d09cc 100644 --- a/pelican-plugins/m/test/images/page.html +++ b/pelican-plugins/m/test/images/page.html @@ -75,19 +75,25 @@ Yes. -

Image grid with a PNG file and a JPEG with sparse EXIF data:

+

Image grid with a PNG file, JPEG with sparse EXIF data, JPEG with no EXIF data +and long exposure (>1 second):

-
+
-
+
F2.8
-
+
+
+
+
+
+
1.5 s
diff --git a/pelican-plugins/m/test/images/page.rst b/pelican-plugins/m/test/images/page.rst index 273d9838..3be7a03d 100644 --- a/pelican-plugins/m/test/images/page.rst +++ b/pelican-plugins/m/test/images/page.rst @@ -57,10 +57,12 @@ Image grid: {filename}/flowers.jpg {filename}/ship.jpg -Image grid with a PNG file and a JPEG with sparse EXIF data: +Image grid with a PNG file, JPEG with sparse EXIF data, JPEG with no EXIF data +and long exposure (>1 second): .. image-grid:: {filename}/tiny.png {filename}/sparseexif.jpg + {filename}/noexif.jpg {filename}/longexposure.jpg diff --git a/pelican-plugins/m/test/test_images.py b/pelican-plugins/m/test/test_images.py index 84725d60..61408b22 100644 --- a/pelican-plugins/m/test/test_images.py +++ b/pelican-plugins/m/test/test_images.py @@ -31,7 +31,12 @@ class Images(PluginTestCase): def test(self): self.run_pelican({ 'PLUGINS': ['m.htmlsanity', 'm.images'], - 'STATIC_PATHS': ['tiny.png', 'ship.jpg', 'flowers.jpg', 'sparseexif.jpg', 'longexposure.jpg'] + 'STATIC_PATHS': ['tiny.png', + 'ship.jpg', + 'flowers.jpg', + 'sparseexif.jpg', + 'noexif.jpg', + 'longexposure.jpg'] }) # -- 2.30.2