(t *testing.T)
| 8 | ) |
| 9 | |
| 10 | func TestUcFirst(t *testing.T) { |
| 11 | scenarios := []struct { |
| 12 | val string |
| 13 | expected string |
| 14 | }{ |
| 15 | {"", ""}, |
| 16 | {" ", " "}, |
| 17 | {"Test", "Test"}, |
| 18 | {"test", "Test"}, |
| 19 | {"test test2", "Test test2"}, |
| 20 | } |
| 21 | |
| 22 | for i, s := range scenarios { |
| 23 | t.Run(fmt.Sprintf("%d_%#v", i, s.val), func(t *testing.T) { |
| 24 | result := inflector.UcFirst(s.val) |
| 25 | if result != s.expected { |
| 26 | t.Fatalf("Expected %q, got %q", s.expected, result) |
| 27 | } |
| 28 | }) |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | func TestColumnify(t *testing.T) { |
| 33 | scenarios := []struct { |