'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 18 November 2007 at 7:05:19 pm'! "Change Set: FileCopyPluginTest-dtl Date: 18 November 2007 Author: David T. Lewis Unit test to verify operation of FileCopyPlugin. Support code changes are required. For all platforms: platforms/Cross/plugins/FileCopyPlugin/FileCopyPlugin.h For Unix: platforms/unix/plugins/FileCopyPlugin/sqUnixFileCopyPlugin.c platforms/unix/vm/sqUnixCharConv.c platforms/unix/vm/sqPlatformSpecific.h Other platforms will require platform support file updates. "! TestCase subclass: #FileCopyPluginTestCase instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Tests-VM-Plugins'! !FileCopyPluginTestCase methodsFor: 'testing' stamp: 'dtl 11/18/2007 19:04'! testCopy "(FileCopyPluginTestCase selector: #testCopy) debug" | f c foo bar | foo := FileDirectory default pathName, FileDirectory slash, 'foo.txt'. bar := FileDirectory default pathName, FileDirectory slash, 'bar.txt'. FileDirectory default deleteFileNamed: bar. (FileDirectory default fileExists: foo) ifFalse: [[f := FileStream fileNamed: foo. f nextPutAll: 'hello world'; lf] ensure: [f close]]. self primCopyFileNamed: foo to: bar. self assert: (FileDirectory default fileExists: bar). [f := FileStream oldFileNamed: bar. c := f contentsOfEntireFile] ensure: [f close]. self assert: (c = 'hello world') ! ! !FileCopyPluginTestCase methodsFor: 'apply primitives' stamp: 'dtl 11/11/2007 17:47'! primCopyFileNamed: srcName to: dstName "primitiveExternalCall" self primitiveFailed! !