test: fix cast-buffer test