(t *testing.T)
| 389 | } |
| 390 | |
| 391 | func TestInput_Prefix(t *testing.T) { |
| 392 | str := New("foobar") |
| 393 | against := "foobar" |
| 394 | if val := str.Prefix("foo"); val != against { |
| 395 | t.Errorf("Expected: to be %s but got: %s", against, val) |
| 396 | } |
| 397 | |
| 398 | str = New("foobar") |
| 399 | against = "foofoofoobar" |
| 400 | if val := str.Prefix("foofoo"); val != against { |
| 401 | t.Errorf("Expected: to be %s but got: %s", against, val) |
| 402 | } |
| 403 | } |
| 404 | |
| 405 | func TestInput_Suffix(t *testing.T) { |
| 406 | str := New("foobar") |