[Pkg] Rio: Rio-Test-kph.48.mcz
squeak-dev-noreply at lists.squeakfoundation.org
squeak-dev-noreply at lists.squeakfoundation.org
Fri Nov 7 02:58:53 UTC 2008
A new version of Rio-Test was added to project Rio:
http://www.squeaksource.com/Rio/Rio-Test-kph.48.mcz
==================== Summary ====================
Name: Rio-Test-kph.48
Author: kph
Time: 7 November 2008, 2:58:27 am
UUID: f4524a7f-8b4a-41d4-8af8-43195eff84c7
Ancestors: Rio-Test-kph.47
ftp support complete(?)
=============== Diff against Rio-Test-kph.47 ===============
Item was changed:
----- Method: RioGzipTest>>gzipWriteAndRead (in category 'tests') -----
gzipWriteAndRead
+ self assert: (self fox size = 44).
- self assert: (self testString size = 44).
rio := (self useTestDir / 'zip.gz') gzip writer: [ :out | out << self testString ].
self assert: (rio isFile & rio fileSize = 62).
"reading from a gzip file should honour the binary setting of the stream even though the actual on disk file is binary"
+ self assert: ( rio contents = self testString ).
- self assert: ( rio fileContents = self testString ).
+ self assert: ( rio contents size = 44 ).
- self assert: ( rio fileContents size = 44 ).
!
Item was changed:
----- Method: RioDirTest>>makeDirectoriesAndFiles (in category 'fixtures') -----
makeDirectoriesAndFiles
subDir := (testDir / 't_a') mkdir.
+ a := (subDir / 'f_1') contents: 'test file'.
- a := (subDir / 'f_1') touch.
b := (subDir / 't_1') mkdir.
c := (subDir / 't_2') mkdir.
!
Item was changed:
----- Method: RioDirTest>>addTree (in category 'tests-directory copying') -----
addTree
+
-
self makeDirectoriesAndFiles.
destDir mkdir addTree: testDir.
+ self assert: (destDir all entries size = 5).
+
+ self assert: ((testDir / 't_a' / 'f_1') contents = 'test file').
+ self assert: ((destDir / 'testing_rio'/ 't_a' / 'f_1') contents = 'test file').!
- self assert: (destDir all entries size = 5)!
Item was added:
+ ----- Method: RioStreamsCopyTest>>testCopyStreamsProgressing (in category 'as yet unclassified') -----
+ testCopyStreamsProgressing
+
+ | in |
+
+ in := self fox readStream.
+
+ self assert:(self fox = (String streamContents: [ :out |
+ in copyTo: out size: self fox size withProgress: 'test'.
+ ]))!
Item was changed:
----- Method: RioDirTest class>>resources (in category 'as yet unclassified') -----
resources
+ self new tearDown.
- self new prepare.
-
^ super resources!
Item was added:
+ RioDirTest subclass: #RioDirFtpTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Rio-Test'!
Item was changed:
----- Method: RioDirTest>>tearDown (in category 'fixtures') -----
tearDown
+
-
testDir all delete.
destDir all delete.!
Item was added:
+ TestCase subclass: #RioStreamsCopyTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Rio-Test'!
Item was changed:
----- Method: RioGzipTest>>testOldCompressDecompress (in category 'tests') -----
testOldCompressDecompress
"self debug: #testOldCompressDecompress"
self newTextFile.
GZipWriteStream compressFile: textFile full asString.
textFile rename ext: 'orig'.
GZipReadStream saveContents: (textFile + '.gz') full asString.
+ self assert: (textFile contents = (textFile ext: 'orig') contents). !
- self assert: (textFile fileContents = (textFile ext: 'orig') fileContents). !
Item was added:
+ ----- Method: RioStreamsCopyTest>>fox (in category 'as yet unclassified') -----
+ fox
+
+ ^ 'the quick brown fox jumped over the lazy dog' !
Item was added:
+ ----- Method: RioDirTest class>>usesNetwork (in category 'as yet unclassified') -----
+ usesNetwork
+
+ ^ self allStandardTests!
Item was changed:
----- Method: RioDirTest>>initialize (in category 'fixtures') -----
initialize
+ testDir := Rio / 'testing_rio'.
- testDir := Rio / 'testing_rio'..
destDir := Rio / 'testing_rio_dest'.!
Item was added:
+ ----- Method: RioKernelTest>>fox (in category 'fixtures') -----
+ fox
+
+ ^ 'the quick brown fox jumped over the lazy dog' !
Item was added:
+ ----- Method: RioDirFtpTest class>>shouldInheritSelectors (in category 'as yet unclassified') -----
+ shouldInheritSelectors
+ ^ true!
Item was changed:
----- Method: RioGzipTest>>testNewCompressDecompress (in category 'tests') -----
testNewCompressDecompress
"self debug: #testOldCompressDecompress"
| original |
self newTextFile.
textFile gzip compress.
original := textFile rename ext: 'orig'.
(textFile + '.gz') auto decompress.
+ self assert: (textFile contents = original contents). !
- self assert: (textFile fileContents = original fileContents). !
Item was added:
+ ----- Method: RioStreamsCopyTest>>testCopyStreamsBinary (in category 'as yet unclassified') -----
+ testCopyStreamsBinary
+
+ | inData in |
+
+ in := (inData := self fox asByteArray) readStream.
+
+ self assert:(inData = (ByteArray streamContents: [ :out |
+ in copyTo: out size: inData size withProgress: 'test binary copy'.
+ ]))
+
+ !
Item was added:
+ ----- Method: RioDirFtpTest>>initialize (in category 'as yet unclassified') -----
+ initialize
+
+ testDir := 'ftp://squeak:viewpoints@squeak.warwick.st/testing_rio' asRio.
+ destDir := 'ftp://squeak:viewpoints@squeak.warwick.st/testing_rio_dest' asRio.!
Item was changed:
----- Method: RioGzipTest>>gzipWriteAndReadBinary (in category 'tests') -----
gzipWriteAndReadBinary
+ self assert: (self fox size = 44).
- self assert: (self testString size = 44).
rio := (self useTestDir / 'zip.gz') gzip setModeToBinary writer: [ :out | out << self testString asByteArray ].
self assert: (rio isFile & rio fileSize = 62).
+ self assert: ( rio setModeToBinary contents = self testString asByteArray ).
- self assert: ( rio setModeToBinary fileContents = self testString asByteArray ).
+ self assert: ( rio setModeToBinary contents size = 44 ).!
- self assert: ( rio setModeToBinary fileContents size = 44 ).!
Item was added:
+ ----- Method: RioStreamsCopyTest>>testCopyStreams (in category 'as yet unclassified') -----
+ testCopyStreams
+
+ | in |
+
+ in := self fox readStream.
+
+ self assert:(self fox = (String streamContents: [ :out |
+ in copyTo: out.
+ ]))!
Item was removed:
- ----- Method: RioDirTest>>prepare (in category 'fixtures') -----
- prepare
-
- self tearDown!
Item was removed:
- ----- Method: RioTest>>testString (in category 'tests') -----
- testString
-
- ^ 'the quick brown fox jumped over the lazy dog' !
Item was removed:
- ----- Method: RioTest>>copyStreamsBinary (in category 'tests') -----
- copyStreamsBinary
-
- | inData in |
-
- in := (inData := self testString asByteArray) readStream.
-
- self assert:(inData = (ByteArray streamContents: [ :out |
- in copyTo: out withProgress: 'test binary copy'.
- ]))
-
- !
Item was removed:
- ----- Method: RioTest>>copyStreams (in category 'tests') -----
- copyStreams
-
- | in |
-
- in := self testString readStream.
-
- self assert:(self testString = (String streamContents: [ :out |
- in copyTo: out.
- ]))!
Item was removed:
- ----- Method: RioTest>>copyStreamsProgressing (in category 'tests') -----
- copyStreamsProgressing
-
- | in |
-
- in := self testString readStream.
-
- self assert:(self testString = (String streamContents: [ :out |
- in copyTo: out withProgress: 'test'.
- ]))!
More information about the Packages
mailing list