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

> The first buffer is preferred when both are listed

But in a test above, this buffer is preferred because `test_` is at the start of the buffer name. So this comment would make more sense if both buffer names started with `test_` in this test.