refactor: move optionToFmtstr() to termseq.go (#2323)

This commit is contained in:
CatsDeservePets authored and GitHub committed 2025-12-27 17:37:30 +01:00
1 parent eb01cb7c7b
commit 57d02dd01d
4 files changed
+26 -26

No files matched your search

-16
View File
@@ -508,22 +508,6 @@ func TestTruncateFilename(t *testing.T) {
}
}
func TestOptionToFmtstr(t *testing.T) {
tests := []struct {
s string
exp string
}{
{"\033[1m", "\033[1m%s\033[0m"},
{"\033[1;7;31;42m", "\033[1;7;31;42m%s\033[0m"},
}
for _, test := range tests {
if got := optionToFmtstr(test.s); got != test.exp {
t.Errorf("at input %q expected %q but got %q", test.s, test.exp, got)
}
}
}
func TestReadLines(t *testing.T) {
tests := []struct {
s string