From 6d9369908dcd4d53160ec1c6477700795190e749 Mon Sep 17 00:00:00 2001 From: Hunter B Date: Sat, 30 May 2026 21:46:05 -0700 Subject: [PATCH] style: format shell gating tests --- crates/tui/src/tools/registry.rs | 34 +++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/crates/tui/src/tools/registry.rs b/crates/tui/src/tools/registry.rs index 70317dff..d5dfdaf6 100644 --- a/crates/tui/src/tools/registry.rs +++ b/crates/tui/src/tools/registry.rs @@ -1402,9 +1402,18 @@ mod tests { .with_agent_tools(false) .build(ctx); - assert!(!registry.contains("exec_shell"), "exec_shell should be excluded when allow_shell is false"); - assert!(!registry.contains("task_shell_start"), "task_shell_start should be excluded when allow_shell is false"); - assert!(!registry.contains("task_shell_wait"), "task_shell_wait should be excluded when allow_shell is false"); + assert!( + !registry.contains("exec_shell"), + "exec_shell should be excluded when allow_shell is false" + ); + assert!( + !registry.contains("task_shell_start"), + "task_shell_start should be excluded when allow_shell is false" + ); + assert!( + !registry.contains("task_shell_wait"), + "task_shell_wait should be excluded when allow_shell is false" + ); } #[test] @@ -1412,12 +1421,19 @@ mod tests { let tmp = tempdir().expect("tempdir"); let ctx = ToolContext::new(tmp.path().to_path_buf()); - let registry = ToolRegistryBuilder::new() - .with_agent_tools(true) - .build(ctx); + let registry = ToolRegistryBuilder::new().with_agent_tools(true).build(ctx); - assert!(registry.contains("exec_shell"), "exec_shell should be included when allow_shell is true"); - assert!(registry.contains("task_shell_start"), "task_shell_start should be included when allow_shell is true"); - assert!(registry.contains("task_shell_wait"), "task_shell_wait should be included when allow_shell is true"); + assert!( + registry.contains("exec_shell"), + "exec_shell should be included when allow_shell is true" + ); + assert!( + registry.contains("task_shell_start"), + "task_shell_start should be included when allow_shell is true" + ); + assert!( + registry.contains("task_shell_wait"), + "task_shell_wait should be included when allow_shell is true" + ); } }