aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/gleam/list_test.gleam12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/gleam/list_test.gleam b/test/gleam/list_test.gleam
index 3277e47..f1acfb2 100644
--- a/test/gleam/list_test.gleam
+++ b/test/gleam/list_test.gleam
@@ -578,3 +578,15 @@ pub fn window_by_2_test() {
|> list.window_by_2
|> should.equal([])
}
+
+pub fn drop_while_test() {
+ [1, 2, 3, 4]
+ |> list.drop_while(fn(x) { x < 3 })
+ |> should.equal([3, 4])
+}
+
+pub fn take_while_test() {
+ [1, 2, 3, 4]
+ |> list.take_while(fn(x) { x < 3 })
+ |> should.equal([1, 2])
+}