Ryan Liptak acd6ffdf69 Reader.peekDelimiterInclusive: Fix handling of stream implementations that return 0
Previously, the logic in peekDelimiterInclusive (when the delimiter was not found in the existing buffer) used the `n` returned from `r.vtable.stream` as the length of the slice to check, but it's valid for `vtable.stream` implementations to return 0 if they wrote to the buffer instead of `w`. In that scenario, the `indexOfScalarPos` would be given a 0-length slice so it would never be able to find the delimiter.

This commit changes the logic to assume that `r.vtable.stream` can both:
- return 0, and
- modify seek/end (i.e. it's also valid for a `vtable.stream` implementation to rebase)

Also introduces `std.testing.ReaderIndirect` which helps in being able to test against Reader implementations that return 0 from `stream`/`readVec`

Fixes #25428
2025-10-09 12:01:51 -07:00
..
2025-08-26 21:17:38 +02:00
2025-07-16 10:27:40 -07:00
2025-08-15 10:44:35 -07:00
2024-12-19 17:10:03 -05:00
2025-07-07 22:43:51 -07:00
2025-09-24 03:50:22 +02:00
2025-07-31 22:10:11 -07:00
2025-10-06 23:26:15 +02:00
2025-07-14 00:16:49 -07:00
2025-09-25 03:58:58 +02:00
2025-07-07 22:43:51 -07:00
2025-07-07 22:43:51 -07:00
2025-07-14 00:14:21 -07:00
2024-08-22 08:44:08 +02:00
2025-08-08 12:47:00 -07:00
2025-08-08 17:17:53 -07:00
2025-07-31 22:10:11 -07:00
2024-07-31 16:57:42 -07:00
2025-08-01 14:57:16 -07:00
2025-07-07 22:43:51 -07:00
2024-08-29 23:43:52 +01:00
2025-09-24 03:50:22 +02:00
2025-07-30 23:28:58 +01:00
2025-07-22 09:41:44 -07:00
2025-08-15 10:44:35 -07:00
2025-08-07 10:04:52 -07:00
2025-07-16 10:27:39 -07:00
2025-08-15 10:44:35 -07:00