aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/test/basic_SUITE_data/basic_pattern_match.erl
diff options
context:
space:
mode:
authorKostis Sagonas <[email protected]>2015-11-30 00:12:30 +0100
committerKostis Sagonas <[email protected]>2015-12-16 22:08:34 +0100
commite91d465773e349409476ab8c85f9967a4fb7cc4a (patch)
treed0a3a89c366aa87b8b1046b009c7aace5852be15 /lib/hipe/test/basic_SUITE_data/basic_pattern_match.erl
parent11e67cc4bfa8242bbb5a5c64d91dd6186bb2c4e4 (diff)
downloadotp-e91d465773e349409476ab8c85f9967a4fb7cc4a.tar.gz
otp-e91d465773e349409476ab8c85f9967a4fb7cc4a.tar.bz2
otp-e91d465773e349409476ab8c85f9967a4fb7cc4a.zip
Three more tests added
Diffstat (limited to 'lib/hipe/test/basic_SUITE_data/basic_pattern_match.erl')
-rw-r--r--lib/hipe/test/basic_SUITE_data/basic_pattern_match.erl10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/hipe/test/basic_SUITE_data/basic_pattern_match.erl b/lib/hipe/test/basic_SUITE_data/basic_pattern_match.erl
index 9922b34415..93240354a7 100644
--- a/lib/hipe/test/basic_SUITE_data/basic_pattern_match.erl
+++ b/lib/hipe/test/basic_SUITE_data/basic_pattern_match.erl
@@ -11,6 +11,7 @@
test() ->
ok = test_hello_world(),
+ ok = test_list_plus_plus_match(),
ok.
%%--------------------------------------------------------------------
@@ -34,3 +35,12 @@ gimme(binary) ->
<<"hello world">>.
%%--------------------------------------------------------------------
+%% Makes sure that pattern matching expressions involving ++ work OK.
+%% The third expression caused a problem in the Erlang shell of R11B-5.
+%% It worked OK in both interpreted and compiled code.
+
+test_list_plus_plus_match() ->
+ ok = (fun("X" ++ _) -> ok end)("X"),
+ ok = (fun([$X | _]) -> ok end)("X"),
+ ok = (fun([$X] ++ _) -> ok end)("X"),
+ ok.