--- a/RegressionTests__StreamTests.st Mon Jan 22 13:15:11 2018 +0100
+++ b/RegressionTests__StreamTests.st Wed Jan 31 23:44:47 2018 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"{ Package: 'stx:goodies/regression' }"
"{ NameSpace: RegressionTests }"
@@ -723,6 +725,36 @@
"
"Modified: / 06-12-2016 / 14:25:11 / cg"
+!
+
+test50_skipThrough
+ |s|
+
+ "0123456789012345678901"
+ s := '0123456789012345678901' readStream.
+ self assert:(s position == 0).
+ s skipThrough:$0.
+ self assert:(s peek == $1).
+ self assert:(s position == 1).
+
+ s skipThrough:$0.
+ self assert:(s peek == $1).
+ self assert:(s position == 11).
+
+ s skipThrough:$0.
+ self assert:(s peek == $1).
+ self assert:(s position == 21).
+
+ s := 'bla { foo }' readStream.
+ s skipThrough:${.
+ self assert:(s peek == $ ).
+ s skipThrough:$}.
+ self assert:(s atEnd).
+
+ "
+ self run:#test50_skipThrough
+ self new test50_skipThrough
+ "
! !
!StreamTests class methodsFor:'documentation'!