is($stream->next, undef, 'No more');
-exit 0;
-
my $complex_op = FromCode->new(
code => bind_array(S => \@servers),
next => FromCode->new(
for_state => make_state([ qw(S P) ], $complex_op)
);
-::Dwarn($cstream->next);
-::Dwarn($cstream->next);
-::Dwarn($cstream->next);
-::Dwarn($cstream->next);
-::Dwarn($cstream->next);
+is_deeply(
+ [ $cstream->results ],
+ [
+ { P => 'csh', S => 'jim.example.com' },
+ { P => 'csh', S => 'joe.example.com' },
+ { P => 'bash', S => 'joe.example.com' },
+ { P => 'csh', S => 'bob.example.com' },
+ ],
+ 'Complex stream'
+);
done_testing;