Unit test the stream read compat function.