From f1c437da38dfec6f4526ed3ca677fb272e24fadc Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Thu, 5 Mar 2020 11:31:55 +0000 Subject: string.join --- test/gleam/string_test.gleam | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test') diff --git a/test/gleam/string_test.gleam b/test/gleam/string_test.gleam index f4f9089..3f278f6 100644 --- a/test/gleam/string_test.gleam +++ b/test/gleam/string_test.gleam @@ -74,3 +74,17 @@ pub fn concat_test() { |> string.concat |> expect.equal(_, "Hello, world!") } + +pub fn join_test() { + [ + "Hello", "world!", + ] + |> string.join(_, with: ", ") + |> expect.equal(_, "Hello, world!") + + [ + "Hello", "world!", + ] + |> string.join(_, with: "-") + |> expect.equal(_, "Hello-world!") +} -- cgit v1.2.3