diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-16 03:10:55 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-16 03:10:55 +0200 |
| commit | 1fc1611fa99993cab5dc8bf0844183285296e3b2 (patch) | |
| tree | c5c9b8b5abac5b5d4c0d56ed90b0580184cc4383 /internal/testutil/fixtures_test.go | |
| parent | 12090f25a3677291863dbb80277bdad3eaec0324 (diff) | |
Release v0.24.0v0.24.0
Bring unit test coverage from ~75% to 85.1% project-wide. All internal
packages now exceed 80% coverage. Refactored cmd entrypoints to extract
testable run() functions with injectable seams.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/testutil/fixtures_test.go')
| -rw-r--r-- | internal/testutil/fixtures_test.go | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/internal/testutil/fixtures_test.go b/internal/testutil/fixtures_test.go index 7c7f239..4f6b365 100644 --- a/internal/testutil/fixtures_test.go +++ b/internal/testutil/fixtures_test.go @@ -1,6 +1,9 @@ package testutil -import "testing" +import ( + "strings" + "testing" +) func TestFixtures_ZeroCovTargets(t *testing.T) { if MarkdownCodeFence() == "" { @@ -10,3 +13,39 @@ func TestFixtures_ZeroCovTargets(t *testing.T) { t.Fatal("MalformedJSON empty") } } + +func TestMultilineDocBlock(t *testing.T) { + got := MultilineDocBlock() + if !strings.Contains(got, "\n") { + t.Fatal("expected multi-line string") + } + if !strings.HasPrefix(got, "//") { + t.Fatal("expected comment prefix") + } + if !strings.Contains(got, "sum") { + t.Fatal("expected documentation about sum") + } +} + +func TestMultilineChatReply(t *testing.T) { + got := MultilineChatReply() + if !strings.Contains(got, "\n") { + t.Fatal("expected multi-line string") + } + if !strings.Contains(got, "Hello") { + t.Fatal("expected greeting in reply") + } +} + +func TestMultilineFunctionSuggestion(t *testing.T) { + got := MultilineFunctionSuggestion() + if !strings.Contains(got, "\n") { + t.Fatal("expected multi-line string") + } + if !strings.Contains(got, "context.Context") { + t.Fatal("expected context parameter") + } + if !strings.Contains(got, "return") { + t.Fatal("expected return statement") + } +} |
