RegressionTests__BinaryIOTests.st
changeset 693 29463cb88dd5
parent 649 415a9f079659
child 1274 8501a2b641b2
--- a/RegressionTests__BinaryIOTests.st	Wed Oct 24 16:16:55 2012 +0200
+++ b/RegressionTests__BinaryIOTests.st	Wed Oct 24 16:18:30 2012 +0200
@@ -500,6 +500,32 @@
      self run:#testStrings2
      self new testStrings2
     "
+!
+
+test_store_retrieve_string_and_array_01
+    |original retrieved hello inStream outStream|
+
+    hello := 'hello'.
+    original := Array with:hello with:hello.
+
+    [
+        outStream := 'data.bos' asFilename writeStream binary.
+        original storeBinaryOn:outStream.
+        outStream close.
+
+        inStream := 'data.bos' asFilename readStream binary.
+        retrieved := Object readBinaryFrom:inStream.
+        inStream close.
+    ] ensure:[
+        'data.bos' asFilename delete
+    ].
+
+    self assert:( (original at:1) == (original at:2) ).         "must be identical"
+    self assert:( (retrieved at:1) == (retrieved at:2) ).       "must be identical"
+
+    "
+     self new test01_store_retrieve_string_and_array_01
+    "
 ! !
 
 !BinaryIOTests class methodsFor:'documentation'!