[bug 801003] Add tests from Cheng's document

This adds a few explicit tests from Cheng's document. Nothing wildly
exciting here, though.

r?