-
I don't think that this is possible at all. Lets say I have a part of a larger parser I want to unit test. It consumes some input and I test if the parsed content matches what I expect. Now I'd like to see if the remaining input matches what I expect. Is that actually possible? The use-case would be that my parser returns me some String, but also makes sure to skip newlines as well. So I'd like to see if the remaining input does still contain those newlines or not. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Ohhhh, I just had the idea to combine it like this: |
Beta Was this translation helpful? Give feedback.
-
That's a nice solution! I would like to have a better way of doing this, but the number of |
Beta Was this translation helpful? Give feedback.
Ohhhh, I just had the idea to combine it like this:
my_parser().then(any().repeated().collect::<String>())
. Maybe there is a shorter version, but it works!