env: add tests

Closes #128.