Add tests for streams/runs

And ensure that it doesn't examine windows that are smaller than necessary.