aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-07-15 12:33:41 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-07-15 12:33:41 +0200
commit01a46375d8aae78d4ad01c043b554e58c5b40768 (patch)
treef705d1f2d4abafb9739831e9683e60feaad6a2f7 /lib/compiler/test
parentd050a82a419231e8435e6c3e2e98972c447b8ce6 (diff)
parent440445cfd0cbeee8f2bb86b99b6d16caf7a5c9c7 (diff)
downloadotp-01a46375d8aae78d4ad01c043b554e58c5b40768.tar.gz
otp-01a46375d8aae78d4ad01c043b554e58c5b40768.tar.bz2
otp-01a46375d8aae78d4ad01c043b554e58c5b40768.zip
Merge branch 'maint'
Conflicts: OTP_VERSION
Diffstat (limited to 'lib/compiler/test')
-rw-r--r--lib/compiler/test/match_SUITE.erl13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/compiler/test/match_SUITE.erl b/lib/compiler/test/match_SUITE.erl
index 31402ac717..127679ba69 100644
--- a/lib/compiler/test/match_SUITE.erl
+++ b/lib/compiler/test/match_SUITE.erl
@@ -24,7 +24,7 @@
pmatch/1,mixed/1,aliases/1,non_matching_aliases/1,
match_in_call/1,untuplify/1,shortcut_boolean/1,letify_guard/1,
selectify/1,underscore/1,match_map/1,map_vars_used/1,
- coverage/1,grab_bag/1]).
+ coverage/1,grab_bag/1,literal_binary/1]).
-include_lib("common_test/include/ct.hrl").
@@ -40,7 +40,7 @@ groups() ->
match_in_call,untuplify,
shortcut_boolean,letify_guard,selectify,
underscore,match_map,map_vars_used,coverage,
- grab_bag]}].
+ grab_bag,literal_binary]}].
init_per_suite(Config) ->
@@ -574,6 +574,15 @@ grab_bag_remove_failure([{stretch,_,Mi}=Stretch | Specs], Unit, _MaxFailure) ->
ok
end.
+%% Regression in 19.0, reported by Alexei Sholik
+literal_binary(_Config) ->
+ 3 = literal_binary_match(bar,<<"y">>),
+ ok.
+
+literal_binary_match(bar, <<"x">>) -> 1;
+literal_binary_match(_, <<"x">>) -> 2;
+literal_binary_match(_, <<"y">>) -> 3;
+literal_binary_match(_, _) -> fail.
id(I) -> I.