[Pkg] Rio: File-Test-kph.11.mcz

squeak-dev-noreply at lists.squeakfoundation.org squeak-dev-noreply at lists.squeakfoundation.org
Mon Mar 2 20:36:05 UTC 2009


A new version of File-Test was added to project Rio:
http://www.squeaksource.com/Rio/File-Test-kph.11.mcz

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

Name: File-Test-kph.11
Author: kph
Time: 2 March 2009, 8:36 pm
UUID: bde1bc6b-0769-11de-a0af-000a95edb42a
Ancestors: File-Test-kph.10

all test pass on unix

=============== Diff against File-Test-kph.10 ===============

Item was added:
+ ----- Method: FileVirtualTestFSUnix class>>classForPath: (in category 'as yet unclassified') -----
+ classForPath: aPath
+ 
+ 	| voted |
+ 	(voted := super classForPath: aPath) = self superclass ifTrue: [ self ] ifFalse: [ voted ]
+ !

Item was changed:
  ----- Method: FileTest>>testLinearRelativeToNot (in category 'tests') -----
  testLinearRelativeToNot
  	
  	
+ 	newFile := 	(file := '/a/b/c' asFile) linearRelativeTo: '/no/relation/at/all' asFile.
- 	newFile := 	(file := '/a/b/c/d/e/f' asFile full) linearRelativeTo: '/no/relation/at/all' asFile.
  	
  	self assert: (newFile = file).!

Item was added:
+ ----- Method: FileModeTests>>testRenamingModeFullNameSetMinor (in category 'renaming mode') -----
+ testRenamingModeFullNameSetMinor
+ 
+ 	| new |
+ 	file := self useTestDir / self hello.
+ 	
+ 	file touch.
+ 	
+ 	self assert: (file isFile).
+  
+ 	new := file rename full: '_test2_/testing/goodbye.text'.
+ 
+ 	self assert: (new isFile).
+ 	self deny: (file isFile).!

Item was changed:
  ----- Method: FileVirtualFSDosFileTest>>testLinearRelativeTo (in category 'tests') -----
  testLinearRelativeTo
  		
+ 	"
+ 	self debug: #testLinearRelativeTo
+ 	"
+  	
+ 	| original |
+ 	original := 'E:\hello\this\is\a\world\apart\from\here.txt' asFile.
+ 	file := original linearRelativeTo: 'E:\hello\this' asFile.
- 	file := fileClass new: 'E:\hello\this\is\a\world\apart\from\here.txt'.
- 	
- 	file := file linearRelativeTo: (fileClass new: 'E:\hello\this').
  	
  	self assert: (file = 'is\a\world\apart\from\here.txt').
+ 	
+ 	self assert: file full = original.	
+  !
- 	 	
- 	 !

Item was added:
+ ----- Method: FileVirtualTestFSDos class>>classForPath: (in category 'as yet unclassified') -----
+ classForPath: aPath
+ 
+ 	| voted |
+ 	(voted := super classForPath: aPath) = self superclass ifTrue: [ self ] ifFalse: [ voted ]
+ !

Item was added:
+ ----- Method: FileVirtualFSUnixKernelTest>>testThisImage (in category 'tests') -----
+ testThisImage
+ 
+ 	| i |
+ 
+ 	i := fileClass thisImage.
+ 	self assert: (i = '/home/user/bob/squeak/this.image').
+ 
+ 	^ i	!

Item was added:
+ ----- Method: FileModeTests>>testRenamingModeFileNameSet (in category 'renaming mode') -----
+ testRenamingModeFileNameSet 
+ 
+ 	| new |
+ 	file := self useTestDir / self hello.
+ 	
+ 	file touch.
+ 	
+ 	self assert: (file isFile).
+  
+ 	new := file rename fileName: 'goodbye.text'.
+ 
+ 	self deny: (file isFile).
+ 	self assert: (new isFile).!

Item was changed:
  ----- Method: FileVirtualFSCommonTest>>setUp (in category 'tests-string behaviour') -----
  setUp
+ 	self localExecutiveClass initializeLocal.
- 
  	self localExecutive initializeDefault!

Item was changed:
  ----- Method: FileVirtualFSUnixFileTest>>testLinearRelativeTo (in category 'tests') -----
  testLinearRelativeTo
+ 	
+ 	| original |
+ 	original := '/hello/this/is/a/world/apart/from/here.txt' asFile.
+ 	file := original linearRelativeTo: '/hello/this' asFile.
- 		
- 	file := (File new: '/hello/this/is/a/world/apart/from/here.txt')
- 						 linearRelativeTo: (File new: '/hello/this').
  	
+ 	self assert: (file = 'is/a/world/apart/from/here.txt').
+ 	
+ 	self assert: file full = original.!
- 	self assert: (file = 'is/a/world/apart/from/here.txt').!

Item was added:
+ ----- Method: FileVirtualFSUnixKernelTest>>testParent (in category 'tests') -----
+ testParent
+ 	 
+ 	"note that the parent of root is the file system 'executive' "
+ 	
+ 	self assert: ((fileClass new: '/a/b') parent = '/a').
+ 	self assert: ((fileClass new: '/a') parent = '/').
+ 	self assert: ((fileClass new: '/') parent class = FileVirtualTestFSUnix).!

Item was added:
+ ----- Method: FileVirtualFSUnixKernelTest>>testInstantiateRoot (in category 'tests') -----
+ testInstantiateRoot
+ 	 
+ 	file := fileClass new: '/'.
+ 	self assert: (file = '/').
+ 	self assert: (file isRoot).
+  !

Item was changed:
  ----- Method: FileModeTests>>testRenamingModeFullNameSet (in category 'renaming mode') -----
  testRenamingModeFullNameSet 
  
+ 	| |
+ 	file := self useTestDir / self hello.
- 	rio := self useTestDir / self hello.
- 	
- 	rio touch.
  	
+ 	file touch.
+ 	
+ 	self assert: (file isFile).
- 	self assert: (rio isFile).
   
+ 	self should: [  file rename full: '/tmp/_test_/goodbye.text' ] raise: Error
+ !
- 	newRio := rio rename fileName: 'goodbye.text'.
- 
- 	self deny: (rio isFile).
- 	self assert: (newRio isFile).!

Item was changed:
  ----- Method: FileTest>>testLinearRelativeTo (in category 'tests') -----
  testLinearRelativeTo
  	
+ 	| original |
+ 	original := '/hello/this/is/a/world/apart/from/here.txt' asFile.
+ 	file := original linearRelativeTo: '/hello/this' asFile.
- 	
- 	file := '/hello/this/is/a/world/apart/from/here.txt' asFile linearRelativeTo: '/hello/this' asFile.
  	
+ 	self assert: (file = 'is/a/world/apart/from/here.txt').
+ 	
+ 	self assert: file full = original.!
- 	self assert: (file = 'is/a/world/apart/from/here.txt').!

Item was added:
+ ----- Method: FileVirtualFSDosKernelTest>>testVerifyHomeDirectory (in category 'tests') -----
+ testVerifyHomeDirectory
+ 
+ 	file :=  self currentFileSystem homeDirectory.
+ 	
+ 	self assert: (file class = dirClass).
+ 	self assert: file asString = 'D:\User\Bob\Squeak'.!

Item was added:
+ ----- Method: FileVirtualFSUnixKernelTest>>testVerifyHomeDirectory (in category 'tests') -----
+ testVerifyHomeDirectory
+ 
+ 	file := self currentFileSystem homeDirectory.
+ 	
+ 	self assert: (file class = dirClass).
+ 	self assert: file asString = '/home/user/bob/squeak'.!

Item was added:
+ ----- Method: FileVirtualFSDosKernelTest>>testSplitToPathAndName (in category 'tests') -----
+ testSplitToPathAndName
+ 
+  	(self fileClass new: 'E:\a\b') splitToPathAndName: [ :p :n |  self assert: (p = 'E:\a'). self assert: (n = 'b') ].
+ 	(self fileClass new: 'E:\a') splitToPathAndName: [ :p :n |  self assert: (p = 'E:\'). self assert: (n = 'a') ].
+ 		(self fileClass new: 'a\b') splitToPathAndName: [ :p :n |  self assert: (p = 'a'). self assert: (n = 'b') ].
+ 	(self fileClass new: 'a') splitToPathAndName: [ :p :n |  self assert: (p = ''). self assert: (n = 'a') ].
+ 	!

Item was added:
+ ----- Method: FileVirtualFSUnixKernelTest>>testSplitToPathAndName (in category 'tests') -----
+ testSplitToPathAndName
+ 
+  	(self fileClass new: 'a/b') splitToPathAndName: [ :p :n |  self assert: (p = 'a'). self assert: (n = 'b') ].
+ 	(self fileClass new: 'a') splitToPathAndName: [ :p :n |  self assert: (p = ''). self assert: (n = 'a') ].
+ 	(self fileClass new: '/a/b') splitToPathAndName: [ :p :n |  self assert: (p = '/a'). self assert: (n = 'b') ].
+ 	(self fileClass new: '/a') splitToPathAndName: [ :p :n |  self assert: (p = '/'). self assert: (n = 'a') ].!

Item was removed:
- ----- Method: FileVirtualFSUnixKernelTest>>root (in category 'tests') -----
- root
- 	 
- 	 !

Item was removed:
- ----- Method: FileVirtualFSUnixKernelTest>>thisImage (in category 'tests') -----
- thisImage
- 
- 	| i |
- 
- 	i := fileClass thisImage.
- 	self assert: (i = '/home/user/bob/squeak/this.image').
- 
- 	^ i	!

Item was removed:
- ----- Method: FileVirtualFSUnixKernelTest>>parent (in category 'tests') -----
- parent
- 	 
- 	"note that the parent of root is the file system 'executive' "
- 	
- 	self assert: ((fileClass new: '/a/b') parent = '/a').
- 	self assert: ((fileClass new: '/a') parent = '/').
- 	self assert: ((fileClass new: '/') parent class = FileVirtualTestFSUnix).!

Item was removed:
- ----- Method: FileVirtualFSUnixKernelTest>>verifyDefaultDirectory (in category 'tests') -----
- verifyDefaultDirectory
- 
- 	file := self currentFileSystem defaultDirectory.
- 	
- 	self assert: (file class = dirClass).
- 	self assert: file asString = '/home/user/bob/squeak'.!

Item was removed:
- ----- Method: FileVirtualFSCommonTest class>>allStandardTests (in category 'as yet unclassified') -----
- allStandardTests
- 
- 	^ super allStandardTests , (self suiteWithMethodCategoryMatching: 'tests*')
- !

Item was removed:
- ----- Method: FileVirtualTestFSUnix>>checkVoted: (in category 'as yet unclassified') -----
- checkVoted: voted
- 
- 	"alternative local executives may override this to rig the voting"
- 
- 	"we rig the voting so we win if the winner is the executive we are spoofing"
- 
- 	^ voted = self class superclass ifTrue: [ ^ self class ] ifFalse: [ voted ]	
- !

Item was removed:
- ----- Method: FileVirtualTestFSDos>>checkVoted: (in category 'as yet unclassified') -----
- checkVoted: voted
- 
- 	"alternative local executives may override this to rig the voting"
- 
- 	"we rig the voting so we win if the winner is the executive we are spoofing"
- 
- 	^ voted = self class superclass ifTrue: [ ^ self class ] ifFalse: [ voted ]	
- !

Item was removed:
- ----- Method: FileVirtualFSUnixKernelTest>>instantiateRoot (in category 'tests') -----
- instantiateRoot
- 	 
- 	file := fileClass new: '/'.
- 	self assert: (file = '/').
- 	self assert: (file isRoot).
-  !

Item was removed:
- ----- Method: FileVirtualFSDosKernelTest>>testVerifyDefaultDirectory (in category 'tests') -----
- testVerifyDefaultDirectory
- 
- 	file :=  self currentFileSystem defaultDirectory.
- 	
- 	self assert: (file class = dirClass).
- 	self assert: file asString = 'D:\User\Bob\Squeak'.!



More information about the Packages mailing list