(t *testing.T)
| 146 | } |
| 147 | |
| 148 | func 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 | |
| 164 | func TestParseEscapeSequence(t *testing.T) { |
| 165 | tests := []struct { |
nothing calls this directly
no test coverage detected