aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2018-10-16 10:36:42 +0200
committerJohn Högberg <[email protected]>2018-10-16 10:36:42 +0200
commit04b6f35a2b270d56896f443241cffa682dfde0f7 (patch)
tree8a3ceaa0994cecb473813c0a07c2a29a344eff36
parent8e65d31faab67b9844bbbaaa6245b2da2dd97b76 (diff)
parent41ab6463e73011969498969834b4ee84024748b0 (diff)
downloadotp-04b6f35a2b270d56896f443241cffa682dfde0f7.tar.gz
otp-04b6f35a2b270d56896f443241cffa682dfde0f7.tar.bz2
otp-04b6f35a2b270d56896f443241cffa682dfde0f7.zip
Merge branch 'maint'
* maint: beam_utils: Handle bs_start_match2 in anno_defs
-rw-r--r--lib/compiler/test/bs_match_SUITE.erl17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/compiler/test/bs_match_SUITE.erl b/lib/compiler/test/bs_match_SUITE.erl
index 8e105c6244..0c6db96081 100644
--- a/lib/compiler/test/bs_match_SUITE.erl
+++ b/lib/compiler/test/bs_match_SUITE.erl
@@ -43,7 +43,7 @@
beam_bsm/1,guard/1,is_ascii/1,non_opt_eq/1,
expression_before_match/1,erl_689/1,restore_on_call/1,
restore_after_catch/1,matches_on_parameter/1,big_positions/1,
- matching_meets_apply/1]).
+ matching_meets_apply/1,bs_start_match2_defs/1]).
-export([coverage_id/1,coverage_external_ignore/2]).
@@ -78,7 +78,7 @@ groups() ->
beam_bsm,guard,is_ascii,non_opt_eq,
expression_before_match,erl_689,restore_on_call,
matches_on_parameter,big_positions,
- matching_meets_apply]}].
+ matching_meets_apply,bs_start_match2_defs]}].
init_per_suite(Config) ->
@@ -1799,6 +1799,19 @@ do_erl_689_2b(_, <<Length, Data/binary>>) ->
{{Y, M, D}, Rest}
end.
+%% ERL-753
+
+bs_start_match2_defs(_Config) ->
+ {<<"http://127.0.0.1:1234/vsaas/hello">>} = api_url(<<"hello">>, dummy),
+ {"https://127.0.0.1:4321/vsaas/hello"} = api_url({https, "hello"}, dummy).
+
+api_url(URL, Auth) ->
+ Header = [],
+ case URL of
+ <<_/binary>> -> {<<"http://127.0.0.1:1234/vsaas/",URL/binary>>};
+ {https, [_|_] = URL1} -> {"https://127.0.0.1:4321/vsaas/"++URL1}
+ end.
+
check(F, R) ->
R = F().