-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c47e3a8
commit 0cd5c72
Showing
4 changed files
with
74 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
heif-convert image.heic -f jpg -q 90 | ||
heif-convert *.heic -f jpg -q 90 -o image-wildcard | ||
heif-convert image.heic -f png | ||
|
||
$status_code = 0 | ||
|
||
$expected_jpg_hash = "3fb5fff1c6bb5f0f5d76d9839f82564d857e81f71e748da1ec480affde10fa8e" | ||
$expected_png_hash = "f6e29566f59bcce7d0486c9745602354cd903da0dbfce3facb8bba476abeee54" | ||
|
||
$actual_jpg_hash = (Get-FileHash -Algorithm SHA256 image.jpg).Hash | ||
$actual_jpg_wildcard_hash = (Get-FileHash -Algorithm SHA256 image-wildcard.jpg).Hash | ||
|
||
if ($expected_jpg_hash -ne $actual_jpg_hash) { | ||
Write-Host "JPG image hash differs from expected. Expected: $expected_jpg_hash, Actual: $actual_jpg_hash" | ||
$status_code = 1 | ||
} | ||
|
||
if ($expected_jpg_hash -ne $actual_jpg_wildcard_hash) { | ||
Write-Host "JPG wildcard image hash differs from expected. Expected: $expected_jpg_hash, Actual: $actual_jpg_wildcard_hash" | ||
$status_code = 1 | ||
} | ||
|
||
$actual_png_hash = (Get-FileHash -Algorithm SHA256 image.png).Hash | ||
|
||
if ($expected_png_hash -ne $actual_png_hash) { | ||
Write-Host "PNG image hash differs from expected. Expected: $expected_png_hash, Actual: $actual_png_hash" | ||
$status_code = 1 | ||
} | ||
|
||
exit $status_code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters