(t *testing.T)
| 368 | } |
| 369 | |
| 370 | func TestHighlightMatch(t *testing.T) { |
| 371 | noColor = true |
| 372 | r := getRenderer() |
| 373 | |
| 374 | result := highlightMatch("contains keyword here", "keyword", r) |
| 375 | if !strings.Contains(result, "keyword") { |
| 376 | t.Error("expected highlighted text to contain the match") |
| 377 | } |
| 378 | |
| 379 | // When no match found, return original |
| 380 | result = highlightMatch("no match", "xyz", r) |
| 381 | if result != "no match" { |
| 382 | t.Errorf("expected original text, got %q", result) |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | func TestSearch_FilterByPriority(t *testing.T) { |
| 387 | resetSearchFlags() |
nothing calls this directly
no test coverage detected