source: tests/collections/.in/string-istream-manip.txt @ 8cffa4f

Last change on this file since 8cffa4f was 8cffa4f, checked in by Michael Brooks <mlbrooks@…>, 9 months ago

Support match-failure reporting for string input.

On failed match, assign the empty-string value to the target.
Prior handling did not modify the target,
which in context like char s[10]; sin | exclude("\n", s);,
left s uninitialized, and invalid for strlen, when the input's next character is a newline.
In this case, scanf offers the return value, the count of output arguments written,
to say, "I did not write to your buffer," a feature lost in the pipe abstraction.

Add tests to exercise such cases.

(Prior "leave uninitialized" treatment was discovered by surprise, while debugging a test program for an upcoming commit.)

  • Property mode set to 100644
File size: 216 bytes
RevLine 
[f54e6ec]1abc
[bf1cbde]2cccccb
[f54e6ec]3xx
4abcxxx
5abcyyy
6aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww
[8cffa4f]7uuuuuccccuuuuu
[ff56dd2e]8abc
[bf1cbde]9cccccb
[ff56dd2e]10xx
11abcxxx
12abcyyy
13aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww
[8cffa4f]14uuuuuccccuuuuu
Note: See TracBrowser for help on using the repository browser.