MCPcopy Create free account
hub / github.com/JanSmrcka/differ / TestRenderNewFile_Basic

Function TestRenderNewFile_Basic

internal/ui/diff_test.go:427–439  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

425}
426
427func TestRenderNewFile_Basic(t *testing.T) {
428 t.Parallel()
429 styles, th := testStyles()
430 result := RenderNewFile("line1\nline2\nline3", "test.go", styles, th, 100)
431 if result == "" {
432 t.Error("expected non-empty render")
433 }
434 // Should have 3 lines of output
435 lines := strings.Split(strings.TrimRight(result, "\n"), "\n")
436 if len(lines) != 3 {
437 t.Errorf("expected 3 lines, got %d", len(lines))
438 }
439}

Callers

nothing calls this directly

Calls 2

testStylesFunction · 0.85
RenderNewFileFunction · 0.85

Tested by

no test coverage detected