Hi,
the problem with this test failure is related with the implementation of lineCount method. Basically the old implementation start to count to 1 and then it adds 1 for each cr found in the string.
OLD IMPLEMENTATION
lineCount
"Answer the number of lines represented by the receiver, where every cr adds one line. 5/10/96 sw"
| cr count |
cr := Character cr.
count := 1 min: self size.
1 to: self size do:
[:i | (self at: i) = cr ifTrue: [count := count + 1]].
^ count
So for the definition of this file:
file := self createFile: (self foldersString , 'fileWith9Chars4Lines2EmptyLines').
stream := file writeStream.
stream
nextPutAll: '123456';
cr;
cr;
nextPutAll: '789';
cr.
In the 1.0 lineCount return 4 -> 1 + 3 cr.
The new lineCount method counts the lines considering only the number of cr, lf or crlf that it find in the string. So the same file definition in the 1.1 return 3 -> 3 cr.
To make this test green the most logic thing it will be to add a cr in the definition of the string in such a way to fit the definition of the new method lineCount.
file := self createFile: (self foldersString , 'fileWith9Chars4Lines2EmptyLines').
stream := file writeStream.
stream
nextPutAll: '123456'; cr;
cr;
cr;
nextPutAll: '789'; cr.
If you agree i will proceed with the modification. (of course this will break the test in the 1.0)
Cheers,
Fabrizio