MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_ls_empty_dir

Function test_ls_empty_dir

core/src/tools/builtin/ls.rs:128–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126
127 #[tokio::test]
128 async fn test_ls_empty_dir() {
129 let temp = tempfile::tempdir().unwrap();
130 let tool = LsTool;
131 let ctx = ToolContext::new(temp.path().to_path_buf());
132
133 let result = tool.execute(&serde_json::json!({}), &ctx).await.unwrap();
134
135 assert!(result.success);
136 assert!(result.content.contains("empty directory"));
137 }
138
139 #[tokio::test]
140 async fn test_ls_nonexistent() {

Callers

nothing calls this directly

Calls 2

pathMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected