[v6.x] test: check reading zero-length env vars
Backport the test from https://github.com/nodejs/node/pull/18463 (6acb1a3d) to make sure nothing accidentally introduces this bug to Node 6. Backport https://github.com/nodejs/node/pull/18463
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines