source: tests/io/.in/manipulatorsInput.txt @ 523e300

Last change on this file since 523e300 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: 1.0 KB
Line 
1123456
21234567
312345678
4123456789
5abc
6cccccb
7xx
8abcxxx
9abcyyy
10aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww
11uuuuuccccuuuuu
12abc
13cccccb
14xx
15abcxxx
16abcyyy
17aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww
18uuuuuccccuuuuu
19ab
200xff 017 15-15
210xff 017 15-15
220xff 017 15-15
230xff 017 15-15
240xff 017 15-15
250xff 017 15-15
260xff 017 15-15
270xff 017 15-15
280xff 017 15-15
290xff 017 15-15
303.5 3.456E+2 -0x1.2p-3 0X1.23p3
313.5 3.456E+2 -0x1.2p-3 0X1.23p3
323.5 3.456E+2 -0x1.2p-3 0X1.23p3
333.5 3.5 3.456E+23.456E+2 -0x1.2p-3 3.5 0X1.23p3     3.5
343.5 3.5 3.456E+23.456E+2 -0x1.2p-3 3.5 0X1.23p3     3.5
353.5 3.5 3.456E+23.456E+2 -0x1.2p-3 3.5 0X1.23p3     3.5
3625 -25 42798
371402432282 1505850196993244515
38394749758663249135511342
3912935154696204706112391834394
40
41423859149128410414395372834994551
42
43
4413889016598639747063234935497057631587
45170141183460469231731687303715884105727
46340282366920938463463374607431768211455
47-340282366920938463463374607431768211455
48340282366920938463463374607431768211455999
491234567890123456789 -1234567890123456789
Note: See TracBrowser for help on using the repository browser.