source: tests/io/.expect/manipulatorsInput.x86.txt @ 8e860a7

Last change on this file since 8e860a7 was 0860d9c, checked in by Michael Brooks <mlbrooks@…>, 13 months ago

Fix read-to-variable-length-string cases when internal buffer fills.

Also fix read-to-cstring ability to give no-exception cases when an entire buffer fills.

The added test cases run, and fail, when run against prior libcfa.
Doing so illustrates a CFA-string-level bug.
Doing so illustrates a C-string-level changed semantics.

At the CFA-string level, the bug was, when reading strings of just the right length,
what should be two reads ("abc" then "def") gets mashed into one ("abcdef").
These cases are clearly bugs because a test program that just echoes chuncks of delimeted input would do so inaccurately.
They're just hard to drive because the relevant chunk lengths are implementation-dependent, and sometimes big.

At the C-string level, the semantic change concerns when to throw the cstring_length exception.
By this change, make the original semantics,
"An exception means the maximum number of characters was read," into
"An exception means that if the buffer were larger, then more characters would have been read."

The added test cases cover the respective stop conditions for manipulator state "%s", include, exclude, getline, and getline/delimiter.

  • Property mode set to 100644
File size: 865 bytes
RevLine 
[2fa0237]1pre1 "123456", canary ok
[0860d9c]2pre2 "1234567", canary ok
3pre3a "1234567", exception occurred, canary ok
4pre3b "8", canary ok
5pre4a "1234567", exception occurred, canary ok
6pre4b "89", canary ok
[ca8824d]71 yyyyyyyyyyyyyyyyyyyy
82 abcxxx
93 abcxxx
104 aaaaaaaa
115 aaaaaaaa
126 aabbccbb
137 dddwww
148 dddwww
159 dddwww
1610 aaaaaaaa
1711 wwwwwwww
1812 wwwwwwww
1913 wwwwwwww
[8cffa4f]2014 rc=1, cccc
2115 rc=0, q
[ca8824d]221 yyyyyyyyyyyyyyyyyyyy
232 abcxxx
243 abcxxx
254 aaaaaaaa
265 aaaaaaaa
276 aabbccbb
287 dddwww
298 dddwww
309 dddwww
3110 aaaaaaaa
3211 wwwwwwww
3312 wwwwwwww
3413 wwwwwwww
[8cffa4f]3514 cccc
3615
[ca8824d]37a
[86a8be5]38a
[ca8824d]39-1
4015
4115
4215
43255
4415
4515
4615
47255
4815
4915
5015
51255
5215
5315
5415
55255
5615
5715
5815
59255
6015
6115
6215
63255
6415
6515
6615
67255
6815
6915
7015
71255
7215
7315
7415
75255
7615
7715
7815
793.5
80345.6
81345.6
82345.6
833.5
84345.6
85345.6
86345.6
873.5
88345.6
89345.6
90345.6
913.5+3.5i
92345.6+345.6i
93345.6+345.6i
94345.6+345.6i
953.5+3.5i
96345.6+345.6i
97345.6+345.6i
98345.6+345.6i
993.5+3.5i
100345.6+345.6i
101345.6+345.6i
102345.6+345.6i
Note: See TracBrowser for help on using the repository browser.