diff options
author | Louis Pilfold <louis@lpil.uk> | 2020-03-05 11:31:55 +0000 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2020-03-05 11:31:55 +0000 |
commit | f1c437da38dfec6f4526ed3ca677fb272e24fadc (patch) | |
tree | 099d2d8418275dd3fd4da9329a3d81e2e4580e4d /test | |
parent | f7c3428cd7ca4688aefec567e56913ec950e062e (diff) | |
download | gleam_stdlib-f1c437da38dfec6f4526ed3ca677fb272e24fadc.tar.gz gleam_stdlib-f1c437da38dfec6f4526ed3ca677fb272e24fadc.zip |
string.join
Diffstat (limited to 'test')
-rw-r--r-- | test/gleam/string_test.gleam | 14 |
1 files changed, 14 insertions, 0 deletions
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!") +} |