Add tests for ftruncate.