No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

utils_test.go 317B

1234567891011121314
  1. package jsh
  2. import "testing"
  3. func TestFieldsN(t *testing.T) {
  4. testString := "Potatoes are the best strings for testing."
  5. for i := 1; i <= 10; i++ {
  6. fields := FieldsN(testString, i)
  7. fieldsLength := len(fields)
  8. if fieldsLength > i {
  9. t.Errorf("Expected at most %d fields, got %d", i, fieldsLength)
  10. }
  11. }
  12. }