test: add regression test for 29fdb3471

Requires `ulimit -n 3000` on osx...

/cc @bnoordhuis