--- a/RegressionTests__StreamUpToTests.st Fri Sep 26 15:28:24 2014 +0200
+++ b/RegressionTests__StreamUpToTests.st Fri Sep 26 15:35:44 2014 +0200
@@ -44,6 +44,13 @@
!StreamUpToTests methodsFor:'tests'!
test1_Array
+
+ self assert:( #( ) readStream upTo:$c ) = #().
+ self assert:( #( ) readStream upTo:$c; position ) = 0 .
+
+ self assert:( #( $a $b ) readStream next; next; upTo:$c ) = #().
+ self assert:( #( $a $b ) readStream next; next; upTo:$c; position ) = 2 .
+
self assert:( #( $a $b $c $d ) readStream upTo:$c ) = #($a "16r61" $b "16r62").
self assert:( #( $a $b $c $d ) readStream upTo:$c; position ) = 3 .
self assert:( #( $a $b $c $d ) readStream upTo:$1 ) = #($a "16r61" $b "16r62" $c "16r63" $d "16r64") .
@@ -67,6 +74,10 @@
!
test1_String
+
+ self assert:( 'ab' readStream next; next; upTo:$c ) = ''.
+ self assert:( 'ab' readStream next; next; upTo:$c; position ) = 2 .
+
self assert:( 'abcd' readStream upTo:$c ) = 'ab'.
self assert:( 'abcd' readStream upTo:$c; position ) = 3.
self assert:( 'abcd' readStream upTo:$1 ) = 'abcd'.