(t *testing.T)
| 153 | } |
| 154 | |
| 155 | func TestReadTool_FileNotFound(t *testing.T) { |
| 156 | tool, err := NewReadTool(nil) |
| 157 | if err != nil { |
| 158 | t.Fatalf("Failed to create Read tool: %v", err) |
| 159 | } |
| 160 | |
| 161 | input := map[string]any{ |
| 162 | "file_path": "/nonexistent/path/file.txt", |
| 163 | } |
| 164 | |
| 165 | result := ExecuteToolWithRealFS(t, tool, input) |
| 166 | |
| 167 | // 应该返回错误 |
| 168 | errMsg := AssertToolError(t, result) |
| 169 | if !strings.Contains(errMsg, "no such file") { |
| 170 | t.Errorf("Expected file not found error, got: %s", errMsg) |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | func TestReadTool_OffsetAndLimit(t *testing.T) { |
| 175 | t.Skip("Skipping: offset and limit parameters are not implemented in ReadTool") |
nothing calls this directly
no test coverage detected