RegressionTests__StringTests.st
changeset 2572 c0cb4ff0f03a
parent 2570 d62760a8ac9a
child 2575 1d58d4961f53
--- a/RegressionTests__StringTests.st	Tue Feb 25 02:43:10 2020 +0100
+++ b/RegressionTests__StringTests.st	Tue Feb 25 14:52:25 2020 +0100
@@ -2311,6 +2311,18 @@
     self assert:( ('''hello''' unquote:$') = 'hello' ).
 !
 
+test87_misc
+     self assert:( String readSmalltalkStringFrom:('''hello world''' readStream) onError:[nil] ) = 'hello world'.
+     self assert:( String readSmalltalkStringFrom:('''hello '''' world''' readStream) onError:[nil] ) = 'hello '' world'.   
+     self assert:( String readSmalltalkStringFrom:('1 ''hello'' ' readStream) onError:[nil] ) isNil.
+
+     self assert:( String readSmalltalkStringFrom:('1 ''hello'' ' readStream) onError:['foobar'] ) = 'foobar'.   
+     self assert:( String readSmalltalkStringFrom:('''hello\nworld''' readStream) onError:[nil] ) = 'hello\nworld'.       
+
+     self assert:( String readSmalltalkStringFrom:('c''hello\nworld''' readStream) keepCRs:false onError:[nil] ) = c'hello\nworld'.   
+     self assert:( String readSmalltalkStringFrom:('c''hello\tworld''' readStream) keepCRs:false onError:[nil] ) = c'hello\tworld'.   
+!
+
 test90_enumeratingLines
 
     |  |
@@ -2415,3 +2427,4 @@
 version_CVS
     ^ '$Header$'
 ! !
+