add test for truncate