add test for truncate
add test for truncate