break;
case '@': case '%':
- /* stop at the first space, comma or unmatched bracket.
- * deals nicely with cases like (%i, %i).
+ /* stop at the first space, comma, colon or unmatched bracket.
+ * deals nicely with cases like (%i, %i) or {%i: %i}.
*/
for (end = stream->stream + 1;
- end != stream->end && *end != ',' && !g_ascii_isspace (*end);
+ end != stream->end && *end != ',' &&
+ *end != ':' && !g_ascii_isspace (*end);
end++)
if (*end == '(' || *end == '{')
" ('three', %u)]", "two", 3);
g_assert (g_variant_is_of_type (value, G_VARIANT_TYPE ("a(su)")));
check_and_free (value, "[('one', 1), ('two', 2), ('three', 3)]");
+ check_and_free (g_variant_new_parsed ("{%s:%i}", "one", 1), "{'one': 1}");
if (do_failed_test ("*GVariant format string*"))
{