From b8b94dc67aeedfaa616145bf8579c680cad6931f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= Date: Sun, 20 May 2018 17:11:06 +0200 Subject: [PATCH] Escape characters properly once we started using python literals --- tests/bugfixes/redmine/test_issue_662.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/bugfixes/redmine/test_issue_662.py b/tests/bugfixes/redmine/test_issue_662.py index 3312b95a..b335cb9e 100644 --- a/tests/bugfixes/redmine/test_issue_662.py +++ b/tests/bugfixes/redmine/test_issue_662.py @@ -10,31 +10,29 @@ class UnicodeEncodingOfExifUserCommentTag(metaclass=system_tests.CaseMeta): filename = "$data_path/exiv2-empty_copy.jpg" commands = [ - "$exiv2 -u -M'set Exif.Photo.UserComment charset=Ascii An ascii comment' $filename", + """$exiv2 -u -M"set Exif.Photo.UserComment charset=Ascii An ascii comment" $filename""", "$exiv2 -u -PEnh $filename", - """$exiv2 -u -M'set Exif.Photo.UserComment charset=Ascii A -newline' $filename""", + """$exiv2 -u -M"set Exif.Photo.UserComment charset=Ascii A\\nnewline" $filename""", "$exiv2 -u -PEnh $filename", - "$exiv2 -u -M'set Exif.Photo.UserComment charset=Unicode A Unicode comment' $filename", + """$exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode A Unicode comment" $filename""", "$exiv2 -u -PEnh $filename", - "$exiv2 -u -M'set Exif.Photo.UserComment charset=Unicode \u01c4' $filename", + """$exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode \\u01c4" $filename""", "$exiv2 -u -PEnh $filename", - "$exiv2 -u -M'set Exif.Photo.UserComment charset=Unicode A\u01c4C' $filename", + """$exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode A\\u01c4C" $filename""", "$exiv2 -u -PEnh $filename", - """$exiv2 -u -M'set Exif.Photo.UserComment charset=Unicode With -Newline' $filename""", + """$exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode With\\nNewline" $filename""", "$exiv2 -u -PEnh $filename", - "$exiv2 -u -M'set Exif.Photo.UserComment charset=Unicode With\tTab' $filename", + """$exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode With\\tTab" $filename""", "$exiv2 -u -PEnh $filename", #Test invalid escape sequences - "$exiv2 -u -M'set Exif.Photo.UserComment charset=Unicode \\\\ugggg' $filename", + """$exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode \\ugggg" $filename""", "$exiv2 -u -PEnh $filename", ] stdout = [