add tests: encode/decode TXT format