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

fix_1959_tz #2103

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion test/data/issue_1959_poc.xmp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
exif:ExifVersion="0232"
exif:FlashpixVersion="0100"
exif:ColorSpace="65535"
photoshop:DateCreated="2022-01-04T09:41:01+00:00"
Copy link
Collaborator

@piponazo piponazo Feb 16, 2022

Choose a reason for hiding this comment

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

Interesting, you took the same approach I wanted to take here: #2079.

For me it is fine to recover the test case like this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Great minds think alike!

it's not really a fix. It's evasion. It's the metadata convertors. I don't know who thought of adding convertors to the code base. If those convertors are not defined in a standard, they should be implemented in another different project which might use libexiv2. However, I don't know why this is in the metadata engine.

photoshop:Instructions="Test Instructions"
photoshop:AuthorsPosition="Test Creator's Job Title"
photoshop:City="Test City"
Expand Down
226 changes: 226 additions & 0 deletions test/data/issue_1959_poc.xmp.out

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions test/data/test_reference_files/issue_1959_poc.xmp.out
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ Exif.Photo.ExifVersion Undefined 4 48 50 51 50 2.32
Exif.Photo.FlashpixVersion Undefined 4 48 49 48 48 1.00
Exif.Photo.ColorSpace Short 1 65535 Uncalibrated
Exif.Photo.ComponentsConfiguration Undefined 1 1 Y
Exif.Photo.DateTimeOriginal Ascii 20 2022:01:04 17:41:01 2022:01:04 17:41:01
Iptc.Application2.ObjectName String 18 Test IPTC XMP file Test IPTC XMP file
Iptc.Envelope.CharacterSet String 3 %G %G
Iptc.Application2.Keywords String 4 Test Test
Iptc.Application2.SubLocation String 16 Test Sublocation Test Sublocation
Iptc.Application2.SpecialInstructions String 17 Test Instructions Test Instructions
Iptc.Application2.DateCreated Date 8 2022-01-04 2022-01-04
Iptc.Application2.Byline String 14 postscript-dev postscript-dev
Iptc.Application2.BylineTitle String 24 Test Creator's Job Title Test Creator's Job Title
Iptc.Application2.City String 9 Test City Test City
Expand Down Expand Up @@ -211,7 +209,6 @@ Xmp.exif.ExifVersion XmpText 4 0232 2.32
Xmp.exif.FlashpixVersion XmpText 4 0100 1.00
Xmp.exif.ColorSpace XmpText 5 65535 Uncalibrated
Xmp.exif.ComponentsConfiguration XmpSeq 1 1 Y
Xmp.photoshop.DateCreated XmpText 25 2022-01-04T09:41:01+00:00 2022-01-04T09:41:01+00:00
Xmp.photoshop.Instructions XmpText 17 Test Instructions Test Instructions
Xmp.photoshop.AuthorsPosition XmpText 24 Test Creator's Job Title Test Creator's Job Title
Xmp.photoshop.City XmpText 9 Test City Test City
Expand Down
21 changes: 21 additions & 0 deletions tests/bugfixes/github/test_issue_1959.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-

from system_tests import CaseMeta, path, check_no_ASAN_UBSAN_errors

class XmpIptcStandardsTest(metaclass=CaseMeta):
"""
Regression test for the issue described in:
https://github.com/Exiv2/exiv2/issues/1959
"""
url = "https://github.com/Exiv2/exiv2/issues/1959"

def setUp(self):
self.stdout = [open(self.expand_variables("$filename_ref"),'r').read()]

filename = path("$data_path/issue_1959_poc.xmp")
filename_ref = path("$data_path/issue_1959_poc.xmp.out")

commands = ["$exiv2 -Pkvt $filename"]

stderr = [""]
retval = [0]