tests: tag: exif: Add tests for 'non-trivial' chars
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>
Wed, 10 Aug 2011 16:16:13 +0000 (13:16 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>
Wed, 10 Aug 2011 20:46:01 +0000 (17:46 -0300)
Adds two new cases to check that characters are properly
converted to ascii when writen to exif and parsed correctly
back to utf8 when read.

tests/check/libs/tag.c

index 1a22840..e6faa8f 100644 (file)
@@ -1407,7 +1407,6 @@ do_simple_exif_tag_serialization_deserialization (const gchar * gsttag,
   GstTagList *taglist = gst_tag_list_new ();
 
   gst_tag_list_add_value (taglist, GST_TAG_MERGE_REPLACE, gsttag, value);
-
   do_exif_tag_serialization_deserialization (taglist);
 
   gst_tag_list_free (taglist);
@@ -1466,6 +1465,12 @@ GST_START_TEST (test_exif_tags_serialization_deserialization)
   do_simple_exif_tag_serialization_deserialization (GST_TAG_APPLICATION_NAME,
       &value);
 
+  /* non ascii chars */
+  g_value_set_static_string (&value, "AaÄäEeËëIiÏïOoÖöUuÜü");
+  do_simple_exif_tag_serialization_deserialization (GST_TAG_ARTIST, &value);
+  g_value_set_static_string (&value, "Äë");
+  do_simple_exif_tag_serialization_deserialization (GST_TAG_ARTIST, &value);
+
   /* image orientation tests */
   g_value_set_static_string (&value, "rotate-0");
   do_simple_exif_tag_serialization_deserialization (GST_TAG_IMAGE_ORIENTATION,