From 955c22167f3cb29b5937fbdb12f1c57a0ad0e3bf Mon Sep 17 00:00:00 2001 From: clanmills Date: Mon, 23 Mar 2020 08:51:46 +0000 Subject: [PATCH] Fixing Windows Build Breaker (on Appveyor 2015 and 2017). Use """ string syntax on 'set Bla.Dee.Bla' commands. --- tests/bugfixes/github/test_issue_1046.py | 31 ++++++++++++------------ 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/tests/bugfixes/github/test_issue_1046.py b/tests/bugfixes/github/test_issue_1046.py index 3f141bf5..0090019c 100644 --- a/tests/bugfixes/github/test_issue_1046.py +++ b/tests/bugfixes/github/test_issue_1046.py @@ -6,21 +6,22 @@ from system_tests import CaseMeta, CopyFiles, path class test_issue_1046Test(metaclass=CaseMeta): filename = path("$data_path/IMG_0246_copy.exv") - commands = ["$exiv2 -pt -g GPSInfo -g UserCom $filename" - ,"$exiv2 -pv -g GPSInfo -g UserCom $filename" - ,"$exiv2 -M'set Exif.Photo.UserComment charset=Ascii how now brown cow' $filename" - ,"$exiv2 -pt -g UserComment $filename" - ,"$exiv2 -pv -g UserComment $filename" - ,"$exiv2 -M'set Exif.Photo.UserComment charset=Unicode \u0041\u0042' $filename" - ,"$exiv2 -pt -g UserComment $filename" - ,"$exiv2 -pv -g UserComment $filename" - ,"$exiv2 -M'set Exif.Photo.UserComment hello world' $filename" - ,"$exiv2 -pt -g UserComment $filename" - ,"$exiv2 -pv -g UserComment $filename" - ,"$exiv2 -M'set Exif.GPSInfo.GPSProcessingMethod charset=Unicode \u0052\u006f\u0062\u0069\u006e' $filename" - ,"$exiv2 -M'set Exif.GPSInfo.GPSAreaInformation charset=Ascii area information' $filename" - ,"$exiv2 -pt -g GPSPro -g GPSArea $filename" - ,"$exiv2 -pv -g GPSPro -g GPSArea $filename" + # Use the """ string syntax for -M"set Bla.Dee.Bla" commands to ensure they run on Windows! + commands = [ "$exiv2 -pt -g GPSInfo -g UserCom $filename" + , "$exiv2 -pv -g GPSInfo -g UserCom $filename" + ,"""$exiv2 -M"set Exif.Photo.UserComment charset=Ascii how now brown cow" $filename""" + , "$exiv2 -pt -g UserComment $filename" + , "$exiv2 -pv -g UserComment $filename" + ,"""$exiv2 -M"set Exif.Photo.UserComment charset=Unicode \u0041\u0042" $filename""" + , "$exiv2 -pt -g UserComment $filename" + , "$exiv2 -pv -g UserComment $filename" + ,"""$exiv2 -M"set Exif.Photo.UserComment hello world" $filename""" + , "$exiv2 -pt -g UserComment $filename" + , "$exiv2 -pv -g UserComment $filename" + ,"""$exiv2 -M"set Exif.GPSInfo.GPSProcessingMethod charset=Unicode \u0052\u006f\u0062\u0069\u006e" $filename""" + ,"""$exiv2 -M"set Exif.GPSInfo.GPSAreaInformation charset=Ascii area information" $filename""" + , "$exiv2 -pt -g GPSPro -g GPSArea $filename" + , "$exiv2 -pv -g GPSPro -g GPSArea $filename" ] stdout = ["""Exif.Photo.UserComment Undefined 12 AB Exif.GPSInfo.GPSVersionID Byte 4 2.2.0.0