MCPcopy Create free account
hub / github.com/gobeam/stringy / TestInput_LcFirst

Function TestInput_LcFirst

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

Source from the content-addressed store, hash-verified

160}
161
162func TestInput_LcFirst(t *testing.T) {
163 tests := []struct {
164 name string
165 arg string
166 want string
167 }{
168 {
169 name: "leading uppercase",
170 arg: "This is an all lower",
171 want: "this is an all lower",
172 },
173 {
174 name: "empty string",
175 arg: "",
176 want: "",
177 },
178 {
179 name: "multi-byte leading character",
180 arg: "ΔΔΔ",
181 want: "δΔΔ",
182 },
183 }
184
185 for _, tt := range tests {
186 t.Run(tt.name, func(t *testing.T) {
187 if got := New(tt.arg).LcFirst(); got != tt.want {
188 t.Errorf("LcFirst(%v) = %v, want %v", tt.arg, got, tt.want)
189 }
190 })
191 }
192}
193
194func TestInput_Lines(t *testing.T) {
195 lines := New("fòô\r\nbàř\nyolo")

Callers

nothing calls this directly

Calls 2

NewFunction · 0.85
LcFirstMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…