Added test for buffer.c