Add rudimentary tests for ioreg

Yup, that's also what the rust style suggests.