From f64af89e9bab24077458eae7c82c0b9154604bc8 Mon Sep 17 00:00:00 2001 From: Kharec Date: Mon, 16 Mar 2026 17:07:51 +0100 Subject: [PATCH] test: adapt to list.find usage --- test/simple_repl_test.gleam | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/simple_repl_test.gleam b/test/simple_repl_test.gleam index 375f96d..8af8139 100644 --- a/test/simple_repl_test.gleam +++ b/test/simple_repl_test.gleam @@ -1,19 +1,17 @@ -import gleam/dict +import gleam/list import gleeunit import gleeunit/should import simple_repl pub fn command_lookup_test() { - let commands = - simple_repl.build_commands() - |> simple_repl.commands_dict + let commands = simple_repl.build_commands() - let has_help = case dict.get(commands, "help") { + let has_help = case list.find(commands, fn(c) { c.name == "help" }) { Ok(_) -> True Error(_) -> False } - let has_unknown = case dict.get(commands, "foo") { + let has_unknown = case list.find(commands, fn(c) { c.name == "foo" }) { Ok(_) -> True Error(_) -> False }