Add more codec tests (from Cyphre)

Originally proposed by Richard Smolak in
https://gist.github.com/cyphre/9254624