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

Last change on this file since 8cffa4f was 8cffa4f, checked in by Michael Brooks <mlbrooks@…>, 12 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: 322 bytes
Line 
11 yyyyyyyyyyyyyyyyyyyy
22 abcxxx
33 abcxxx
44 aaaaaaaa
55 aaaaaaaa
66 aabbccbb
77 dddwww
88 dddwww
99 dddwww
1010 aaaaaaaa
1111 wwwwwwww
1212 wwwwwwww
1313 wwwwwwww
1414 cccc
1515
161 yyyyyyyyyyyyyyyyyyyy
172 abcxxx
183 abcxxx
194 aaaaaaaa
205 aaaaaaaa
216 aabbccbb
227 dddwww
238 dddwww
249 dddwww
2510 aaaaaaaa
2611 wwwwwwww
2712 wwwwwwww
2813 wwwwwwww
2914 cccc
3015
Note: See TracBrowser for help on using the repository browser.