The note for a line that is too long ends its cut with "| <- LIMIT"
instead of a Unicode arrow, as the guide requires ASCII in every file
except Unicode test data.
Issue:
b14d537
return fmt.Sprintf(`Too long: your last line for this <input> was %d bytes,
over the %d-byte limit. Write the whole line again, cutting just
enough of the least valuable items to fit before this cut:
return fmt.Sprintf(`Too long: your last line for this <input> was %d bytes,
over the %d-byte limit. Write the whole line again, cutting just
enough of the least valuable items to fit before this cut:
-%s| ← LIMIT`, len(line), nodeBytes, cutLine(line))
+%s| <- LIMIT`, len(line), nodeBytes, cutLine(line))
}
// cutLine returns the first nodeBytes bytes of line, without a part of a
}
// cutLine returns the first nodeBytes bytes of line, without a part of a
require.Equal(t, first, parts[:2])
require.Equal(t, []string{tooLong(want)}, parts[2:])
require.Contains(t, parts[2], "was "+strconv.Itoa(len(want))+" bytes,")
require.Equal(t, first, parts[:2])
require.Equal(t, []string{tooLong(want)}, parts[2:])
require.Contains(t, parts[2], "was "+strconv.Itoa(len(want))+" bytes,")
- require.Contains(t, parts[2], "\n"+want[:512]+"| ← LIMIT")
+ require.Contains(t, parts[2], "\n"+want[:512]+"| <- LIMIT")
note, err := json.Marshal(map[string]string{
"type": "input_text",
note, err := json.Marshal(map[string]string{
"type": "input_text",