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

I think the current flow works.

What I am trying to demonstrate in the test is that while `buf1` is preferred when both are listed (as you stated), once `buf1