Add a bunch of preprocessor tests.
Fix a few preprocessor bugs.