[WIP/RFC] Add unit tests for buffer.c and fileio.c

Just to be clear, I think we should stick to `#define`s. Use the preprocessor trick mentioned above to make these available to the tests.