Reliable unit tests

In light of my suspicion of the algorithm in `htmlEquals`, issue #497, I present an experimental branch.