For anyone who finds this thread while looking for ready-made test files: the W3C tests above are for reading systems, and the repository eluyasa linked builds them. I've just started something next to them, a library of small EPUBs for testing the tools that check or change books, such as validators, converters and fixers. Many are broken on purpose, and each one's expected result is written from the specification. They come as ready-made .epub files, tagged so you can pin a version. I've opened a thread for it here, if you want to talk about it or suggest a case:
epub-test-books