Test code for buffer_offsetting