After three years of working on some software (basically some fancy shell scripting but in Python), when the project had grown dramatically beyond its original scope through a host of hacks and bolted-on features, I remembered that the software had unit tests and ran them.
Surprisingly, all the unit tests passed, and my first thought when I saw that was "Man, I bet these unit tests are awful."