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

__Done__ Ran the test for all 3 buffers.