[squeak-dev] The Inbox: Tests-dtl.312.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Mar 8 19:18:19 UTC 2015


David T. Lewis uploaded a new version of Tests to project The Inbox:
http://source.squeak.org/inbox/Tests-dtl.312.mcz

==================== Summary ====================

Name: Tests-dtl.312
Author: dtl
Time: 8 March 2015, 2:18:09.639 pm
UUID: fc56f2ba-15d2-4264-a9e6-6faf41650536
Ancestors: Tests-eem.311

FileStream>>testFileSizeWithSharedFileStreams illustrates a problem that is exhibited on some platforms (notably recent Ubuntu).

=============== Diff against Tests-eem.311 ===============

Item was added:
+ ----- Method: FileStreamTest>>testFileSizeWithSharedFileStreams (in category 'as yet unclassified') -----
+ testFileSizeWithSharedFileStreams
+ 	"If two file streams are opened on the same file, then we expect the operating system
+ 	to report the file size correctly for either of the two file streams. Some platform runtime
+ 	libraries will not honor that convention unless data has been explicitly flushed. This test
+ 	will fail if the platform runtime requires an explicit flush. Recent Ubuntu systems are known
+ 	to exhibit this problem."
+ 
+ 	| fileName fs1 fs2 |
+ 	fileName := 'TruncationTest.tmp'.
+ 	[ 	fs1 := FileStream fileNamed: fileName.
+ 		fs1 nextPutAll: '1234567890'.
+ 		self assert: 10 equals: fs1 size.
+ 		fs2 := FileStream readOnlyFileNamed: fileName.
+ 		self assert: 10 equals: fs2 size.
+ 	] ensure: [
+ 		fs1 close.
+ 		fs2 close.
+ 		FileDirectory default deleteFileNamed: fileName.
+ 	].
+ !



More information about the Squeak-dev mailing list