very close to solve: adding only a line to flush current buffer will
make it work. add test 6

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>