@@ -311,6 +311,17 @@ takeProperties =
311311-- where
312312-- list_length = Prelude.length ls
313313
314+sliceSepBy :: Property
315+sliceSepBy =
316+ forAll (listOf (chooseInt (min_value, max_value ))) $ \ls ->
317+ case S.parse (P.sliceSepBy predicate prsr) (S.fromList ls) of
318+ Right parsed_list -> checkListEqual parsed_list (Prelude.takeWhile
319+ (not. predicate) ls)
320+ Left _ -> property False
321+ where
322+ predicate = (>= 100)
323+ prsr = P.many FL.toList (P.satisfy (const True))
324+
314325takeWhile :: Property
315326takeWhile =
316327 forAll (listOf (chooseInt (0, 1))) $ \ ls ->
@@ -693,6 +704,7 @@ main =
693704 -- prop "lookAhead . take n >> lookAhead . take n = lookAhead . take n" lookAheadPass
694705 -- prop "Fail when stream length exceeded" lookAheadFail
695706 -- prop "lookAhead . take n >> lookAhead . take n = lookAhead . take n, else fail" lookAhead
707+ prop "P.sliceSepBy test" Main.sliceSepBy
696708 prop "P.takeWhile = Prelude.takeWhile" Main.takeWhile
697709 prop ("P.takeWhile1 = Prelude.takeWhile if taken something,"
698710 ++ " else check why failed") takeWhile1