test: add test for autoDestroy in stream
Summary
Apparently, stream.destroy(err)
in errorOrDestroy
is not called. Adding two test cases to cover that line.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines