diff options
author | Björn-Egil Dahlberg <[email protected]> | 2015-03-12 17:09:13 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-03-12 17:09:13 +0100 |
commit | e0e056a62c240542decac2e2b3765a5399efae62 (patch) | |
tree | e7e098af3cfe4c3f71c8b33c5740b61be8495f58 /erts/emulator/test | |
parent | be5b000d488692b2e03c4f8318ce74712e56b7ee (diff) | |
parent | 12408cf3657a88540d7afde88e68639c72212299 (diff) | |
download | otp-e0e056a62c240542decac2e2b3765a5399efae62.tar.gz otp-e0e056a62c240542decac2e2b3765a5399efae62.tar.bz2 otp-e0e056a62c240542decac2e2b3765a5399efae62.zip |
Merge branch 'nox/maps-match_specs-fixes/OTP-12270'
* nox/maps-match_specs-fixes/OTP-12270:
erts: Strengthen maps match spec compilation tests
Properly collect variables in match specs with maps
Fix compilation of match specs with maps
Diffstat (limited to 'erts/emulator/test')
-rw-r--r-- | erts/emulator/test/match_spec_SUITE.erl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/erts/emulator/test/match_spec_SUITE.erl b/erts/emulator/test/match_spec_SUITE.erl index fc4a5028e1..b231c2bbd9 100644 --- a/erts/emulator/test/match_spec_SUITE.erl +++ b/erts/emulator/test/match_spec_SUITE.erl @@ -924,6 +924,14 @@ maps(Config) when is_list(Config) -> table), {ok,#{foo := 3},[],[]} = erlang:match_spec_test({}, [{{},[],[#{foo => {'+',1,2}}]}], table), + {ok,"camembert",[],[]} = + erlang:match_spec_test(#{b => "camembert",c => "cabécou"}, + [{#{b => '$1',c => "cabécou"},[],['$1']}], table), + + {ok,#{a :="camembert",b := "hi"},[],[]} = + erlang:match_spec_test(#{<<"b">> =>"camembert","c"=>"cabécou", "wat"=>"hi", b=><<"other">>}, + [{#{<<"b">> => '$1',"wat" => '$2'},[],[#{a=>'$1',b=>'$2'}]}], + table), ok. empty_list(Config) when is_list(Config) -> |