| 321 | } |
| 322 | |
| 323 | func TestInput_UcFirst(t *testing.T) { |
| 324 | tests := []struct { |
| 325 | name string |
| 326 | arg string |
| 327 | want string |
| 328 | }{ |
| 329 | { |
| 330 | name: "leading lowercase", |
| 331 | arg: "test input", |
| 332 | want: "Test input", |
| 333 | }, |
| 334 | { |
| 335 | name: "empty string", |
| 336 | arg: "", |
| 337 | want: "", |
| 338 | }, |
| 339 | { |
| 340 | name: "multi-byte leading character", |
| 341 | arg: "δδδ", |
| 342 | want: "Δδδ", |
| 343 | }, |
| 344 | } |
| 345 | |
| 346 | for _, tt := range tests { |
| 347 | t.Run(tt.name, func(t *testing.T) { |
| 348 | if got := New(tt.arg).UcFirst(); got != tt.want { |
| 349 | t.Errorf("UcFirst(%v) = %v, want %v", tt.arg, got, tt.want) |
| 350 | } |
| 351 | }) |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | func TestInput_First(t *testing.T) { |
| 356 | fcn := New("4111 1111 1111 1111") |