mirror of
https://github.com/ollama/ollama.git
synced 2026-08-04 14:56:15 +00:00
test(agent): avoid direct terminal dependency
This commit is contained in:
parent
f8527bb734
commit
d2e0438b60
1 changed files with 0 additions and 8 deletions
|
|
@ -11,7 +11,6 @@ import (
|
|||
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/muesli/termenv"
|
||||
|
||||
coreagent "github.com/ollama/ollama/agent"
|
||||
"github.com/ollama/ollama/api"
|
||||
|
|
@ -2133,10 +2132,6 @@ func TestRenderMarkdownTablePreservesValidSeparator(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestRenderMarkdownCodeFencesHighlightLanguageTaggedCode(t *testing.T) {
|
||||
profile := lipgloss.ColorProfile()
|
||||
lipgloss.SetColorProfile(termenv.TrueColor)
|
||||
defer lipgloss.SetColorProfile(profile)
|
||||
|
||||
markdown := strings.Join([]string{
|
||||
"Use **greet** before running this code.",
|
||||
"```go",
|
||||
|
|
@ -2172,9 +2167,6 @@ func TestRenderMarkdownCodeFencesHighlightLanguageTaggedCode(t *testing.T) {
|
|||
if got := markdownCodeTokenKindFor("go", "package", " main"); got != markdownCodeTokenKeyword {
|
||||
t.Fatalf("package token kind = %v, want keyword", got)
|
||||
}
|
||||
if got := highlightMarkdownCodeLine("go", "package main"); !strings.Contains(got, "\x1b[") {
|
||||
t.Fatalf("language-tagged code should render ANSI syntax styling: %q", got)
|
||||
}
|
||||
if got := highlightMarkdownCodeLine("", "plain code stays plain"); got != "plain code stays plain" {
|
||||
t.Fatalf("untagged code = %q, want plain code", got)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue