e0dfeaee040146371204bbfa34de791e846822cc
diff --git a/tests/gobject/gvalue-test.c b/tests/gobject/gvalue-test.c
index 2025d91..8572015 100644
--- a/tests/gobject/gvalue-test.c
+++ b/tests/gobject/gvalue-test.c
@@ -104,6 +104,45 @@ test_enum_transformation (void         *unused,
   g_value_unset (&orig);
 }
 
+static void
+test_flags_transformation (void         *unused,
+                           gconstpointer test_data)
+{
+  GType type;
+  GValue orig = { 0, };
+  GValue xform = { 0, };
+  GFlagsValue values[] = { {1 << 0,"1_NAME","1_NICK"}, {1 << 1,"2_NAME","2_NICK"}};
+
+  type = g_flags_register_static ("TestFlags", values);
+
+  g_value_init (&orig, type);
+  g_value_set_flags (&orig, 3);
+
+  g_value_init (&xform, G_TYPE_CHAR);
+  g_value_transform (&orig, &xform);
+  g_assert_cmpint (g_value_get_char (&xform), ==, 3);
+  g_value_unset (&xform);
+
+  g_value_unset (&orig);
+  g_value_init (&orig, G_TYPE_STRING);
+  g_value_set_string (&orig, "1_NAME");
+
+  g_value_init (&xform, type);
+  g_value_transform (&orig, &xform);
+  g_assert_cmpint (g_value_get_flags (&xform), ==, 1);
+  g_value_unset (&xform);
+
+  g_value_unset (&orig);
+  g_value_init (&orig, G_TYPE_STRING);
+  g_value_set_string (&orig, "1_NAME|2_NICK");
+
+  g_value_init (&xform, type);
+  g_value_transform (&orig, &xform);
+  g_assert_cmpint (g_value_get_flags (&xform), ==, 3);
+  g_value_unset (&xform);
+
+  g_value_unset (&orig);
+}
 
 static void
 test_gtype_value (void         *unused,
@@ -389,6 +428,7 @@ main (int   argc,
   g_test_init (&argc, &argv, NULL);
 
   g_test_add ("/gvalue/enum-transformation", void, NULL, NULL, test_enum_transformation, NULL);
+  g_test_add ("/gvalue/flags-transformation", void, NULL, NULL, test_flags_transformation, NULL);
   g_test_add ("/gvalue/gtype-value", void, NULL, NULL, test_gtype_value, NULL);
   g_test_add ("/gvalue/collection", void, NULL, NULL, test_collection, NULL);
   g_test_add ("/gvalue/copying", void, NULL, NULL, test_copying, NULL);
