aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/lists_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-04-29 09:54:12 +0200
committerBjörn Gustavsson <[email protected]>2016-04-29 09:54:12 +0200
commit06fe4914224a7172a60d318e15885841981b746d (patch)
tree030df2277391ee052f77df65fb6da1c133d39f3d /lib/stdlib/test/lists_SUITE.erl
parente142c20d5d751c0b9ba8c059249097b459ac329e (diff)
parentc660e30a7dd781f71bed050b20c3e2d0b069e063 (diff)
downloadotp-06fe4914224a7172a60d318e15885841981b746d.tar.gz
otp-06fe4914224a7172a60d318e15885841981b746d.tar.bz2
otp-06fe4914224a7172a60d318e15885841981b746d.zip
Merge branch 'jlouis/stdlib/implement-lists-join/PR-1012/OTP-13523'
* jlouis/stdlib/implement-lists-join/PR-1012/OTP-13523: Implement lists:join/2
Diffstat (limited to 'lib/stdlib/test/lists_SUITE.erl')
-rw-r--r--lib/stdlib/test/lists_SUITE.erl16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/stdlib/test/lists_SUITE.erl b/lib/stdlib/test/lists_SUITE.erl
index 6f2a510f65..531e97e8d6 100644
--- a/lib/stdlib/test/lists_SUITE.erl
+++ b/lib/stdlib/test/lists_SUITE.erl
@@ -55,6 +55,7 @@
ufunsort_error/1,
zip_unzip/1, zip_unzip3/1, zipwith/1, zipwith3/1,
filter_partition/1,
+ join/1,
otp_5939/1, otp_6023/1, otp_6606/1, otp_7230/1,
suffix/1, subtract/1, droplast/1, hof/1]).
@@ -119,7 +120,7 @@ groups() ->
{tickets, [parallel], [otp_5939, otp_6023, otp_6606, otp_7230]},
{zip, [parallel], [zip_unzip, zip_unzip3, zipwith, zipwith3]},
{misc, [parallel], [reverse, member, dropwhile, takewhile,
- filter_partition, suffix, subtract,
+ filter_partition, suffix, subtract, join,
hof]}
].
@@ -2413,6 +2414,19 @@ zipwith3(Config) when is_list(Config) ->
ok.
+%% Test lists:join/2
+join(Config) when is_list(Config) ->
+ A = [a,b,c],
+ Sep = x,
+ [a,x,b,x,c] = lists:join(Sep, A),
+
+ B = [b],
+ [b] = lists:join(Sep, B),
+
+ C = [],
+ [] = lists:join(Sep, C),
+ ok.
+
%% Test lists:filter/2, lists:partition/2.
filter_partition(Config) when is_list(Config) ->
F = fun(I) -> I rem 2 =:= 0 end,