(t *testing.T)
| 247 | } |
| 248 | |
| 249 | func TestTreeCmd_Execute_InvalidTarget(t *testing.T) { |
| 250 | // Cleanup. |
| 251 | dirs.RemoveAllForTest() |
| 252 | |
| 253 | treeCmd := treeCmd{} |
| 254 | celer := configs.NewCeler() |
| 255 | treeCmd.celer = celer |
| 256 | |
| 257 | // Test with empty target |
| 258 | err := treeCmd.tree("") |
| 259 | if err == nil { |
| 260 | t.Error("Expected error for empty target") |
| 261 | } |
| 262 | |
| 263 | if !strings.Contains(err.Error(), "empty") { |
| 264 | t.Errorf("Expected error message to contain 'empty', got: %v", err) |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | // Helper function to setup test environment |
| 269 | func setupTestEnvironment(t *testing.T) { |
nothing calls this directly
no test coverage detected