aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test/diameter_compiler_SUITE.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2011-12-04 12:38:43 +0100
committerAnders Svensson <[email protected]>2011-12-05 11:10:59 +0100
commitc11f047bc88406c25c52ff57d1062906a0aeff07 (patch)
treeb1eab356488f53bbd8be1ec24302581c5e52f0ea /lib/diameter/test/diameter_compiler_SUITE.erl
parentf51fa7f2a67cfdcbf98edaa79db32c54e5ee4af0 (diff)
downloadotp-c11f047bc88406c25c52ff57d1062906a0aeff07.tar.gz
otp-c11f047bc88406c25c52ff57d1062906a0aeff07.tar.bz2
otp-c11f047bc88406c25c52ff57d1062906a0aeff07.zip
Fix interpretation of vendor id in @grouped
A value is required to be the same as any specified with @avp_vendor_id but otherwise the two locations are equivalent. Both possibilities are allowed since @avp_vendor_id is required for AVPs of types other than Grouped (modulo it not really needing to exist at all: see commit 943266c9) and since the grammar parsed in @grouped (from RFC 3588) allows it.
Diffstat (limited to 'lib/diameter/test/diameter_compiler_SUITE.erl')
-rw-r--r--lib/diameter/test/diameter_compiler_SUITE.erl9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/diameter/test/diameter_compiler_SUITE.erl b/lib/diameter/test/diameter_compiler_SUITE.erl
index a224a4f12e..cc4b1ddac5 100644
--- a/lib/diameter/test/diameter_compiler_SUITE.erl
+++ b/lib/diameter/test/diameter_compiler_SUITE.erl
@@ -136,6 +136,9 @@
[{"(Failed-AVP .*)>", "\\1 17>"},
{"^ *Failed-AVP .*$", "&V"},
{"@avp_types", "@avp_vendor_id 18 Failed-AVP\n&"}]},
+ {ok,
+ [{"(Failed-AVP .*)>", "\\1 17>"},
+ {"^ *Failed-AVP .*$", "&V"}]},
{message_name_already_defined,
"CEA ::= .*:",
"& 257 > {Result-Code}\n&"},
@@ -244,10 +247,10 @@ replace({E, RE, Repl}, Bin) ->
replace({E, Mods}, Bin) ->
B = iolist_to_binary(lists:foldl(fun re/2, Bin, Mods)),
- case diameter_dict_util:parse(B, [{include, here()}]) of
- {ok, Dict} when E == ok ->
+ case {E, diameter_dict_util:parse(B, [{include, here()}]), Mods} of
+ {ok, {ok, Dict}, _} ->
Dict;
- {error, {E,_} = T} ->
+ {_, {error, {E,_} = T}, _} ->
S = diameter_dict_util:format_error(T),
true = nochar($", S, E),
true = nochar($', S, E),