diff --git a/spec/loophp/collection/CollectionSpec.php b/spec/loophp/collection/CollectionSpec.php index 88fd9b0c3..dca09712e 100644 --- a/spec/loophp/collection/CollectionSpec.php +++ b/spec/loophp/collection/CollectionSpec.php @@ -4047,6 +4047,12 @@ public function it_can_window(): void ], ]); + $this::fromIterable(range('a', 'e')) + ->window(-1) + ->shouldIterateAs([ + ['a'], ['a', 'b'], ['a', 'b', 'c'], ['a', 'b', 'c', 'd'], ['a', 'b', 'c', 'd', 'e'], + ]); + // Unsupported - but tested. $this::fromIterable(range('a', 'e')) ->window(-2)