It is a bit odd that this is accepted (the second value overwrites the
first):
-p a=3 -p a=4
but this isn't:
-p a=3,a=4
Remove the check that prevents duplicate keys from being defined in a
map.
Change-Id: Id39e86bb48ac52c6714db3128b7d767f5347de64
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2423
g_string_assign(state->last_map_key,
state->scanner->value.v_identifier);
- if (bt_value_map_has_entry(state->params,
- state->last_map_key->str)) {
- g_string_append_printf(state->ini_error,
- "Duplicate parameter key: `%s`\n",
- state->last_map_key->str);
- goto error;
- }
-
state->expecting = INI_EXPECT_EQUAL;
goto success;
case INI_EXPECT_EQUAL:
'{a=10500000.0, b=10500000.0, c=1.05e-05, d=1.05e-05}'
expect_success 'array' 'a=[1, [["hi",]]]' \
'{a=[1, [[hi]]]}'
-expect_success 'map' 'a={},b={salut="la gang",comment="ca va",oh={x=2}}' \
+expect_success 'map' 'a=4,a={},b={salut="la gang",comment="ca va",oh={x=2}}' \
'{a={}, b={comment=ca va, oh={x=2}, salut=la gang}}'
rm -f "$expected_file"