MCPcopy Create free account
hub / github.com/gokcehan/lf / TestOptionToFmtstr

Function TestOptionToFmtstr

termseq_test.go:148–162  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

146}
147
148func TestOptionToFmtstr(t *testing.T) {
149 tests := []struct {
150 s string
151 exp string
152 }{
153 {"\033[1m", "\033[1m%s\033[0m"},
154 {"\033[1;7;31;42m", "\033[1;7;31;42m%s\033[0m"},
155 }
156
157 for _, test := range tests {
158 if got := optionToFmtstr(test.s); got != test.exp {
159 t.Errorf("at input %q expected %q but got %q", test.s, test.exp, got)
160 }
161 }
162}
163
164func TestParseEscapeSequence(t *testing.T) {
165 tests := []struct {

Callers

nothing calls this directly

Calls 1

optionToFmtstrFunction · 0.85

Tested by

no test coverage detected