Add more QoL and high prio features

This commit is contained in:
2026-07-28 10:17:18 +02:00
parent 43fa047765
commit fdaee6a69e
16 changed files with 2850 additions and 302 deletions

View File

@@ -1,6 +1,9 @@
package main
import "testing"
import (
"strings"
"testing"
)
func TestApplyThemeChangesAllRenderingThemes(t *testing.T) {
defer func() {
@@ -18,3 +21,14 @@ func TestApplyThemeChangesAllRenderingThemes(t *testing.T) {
t.Fatal("unknown theme was accepted")
}
}
func TestNoColorThemeDisablesSyntaxColors(t *testing.T) {
defer applyTheme("dark")
if err := applyTheme("no-color"); err != nil {
t.Fatal(err)
}
rendered := highlightedSource("go", "func main() {}")
if strings.Contains(rendered, "\x1b[") || colorEnabled {
t.Fatalf("no-color source contains terminal colors: %q", rendered)
}
}