aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2020-03-05 11:31:55 +0000
committerLouis Pilfold <louis@lpil.uk>2020-03-05 11:31:55 +0000
commitf1c437da38dfec6f4526ed3ca677fb272e24fadc (patch)
tree099d2d8418275dd3fd4da9329a3d81e2e4580e4d /test
parentf7c3428cd7ca4688aefec567e56913ec950e062e (diff)
downloadgleam_stdlib-f1c437da38dfec6f4526ed3ca677fb272e24fadc.tar.gz
gleam_stdlib-f1c437da38dfec6f4526ed3ca677fb272e24fadc.zip
string.join
Diffstat (limited to 'test')
-rw-r--r--test/gleam/string_test.gleam14
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!")
+}