Skip to content

Commit

Permalink
Add second test file for better code coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbackhouse committed Aug 27, 2021
1 parent 60144df commit ddd1c47
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Binary file added test/data/issue_1881_coverage.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 9 additions & 7 deletions tests/bugfixes/github/test_issue_1881.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

from system_tests import CaseMeta, CopyTmpFiles, path
@CopyTmpFiles("$data_path/issue_1881_poc.jpg")
@CopyTmpFiles("$data_path/issue_1881_poc.jpg", "$data_path/issue_1881_coverage.jpg")

class SonyPreviewImageLargeAllocation(metaclass=CaseMeta):
"""
Expand All @@ -10,11 +10,13 @@ class SonyPreviewImageLargeAllocation(metaclass=CaseMeta):
"""
url = "https://github.com/Exiv2/exiv2/issues/1881"

filename = path("$tmp_path/issue_1881_poc.jpg")
commands = ["$exiv2 -q -d I rm $filename"]
stdout = [""]
filename1 = path("$tmp_path/issue_1881_poc.jpg")
filename2 = path("$tmp_path/issue_1881_coverage.jpg")
commands = ["$exiv2 -q -d I rm $filename1", "$exiv2 -q -d I rm $filename2"]
stdout = ["",""]
stderr = [
"""Exiv2 exception in erase action for file $filename:
"""Exiv2 exception in erase action for file $filename1:
$kerCorruptedMetadata
"""]
retval = [1]
""",
""]
retval = [1,0]

0 comments on commit ddd1c47

Please sign in to comment.