tests: add I/O test.