--TEST-- Test ftruncate() function : usage variations - truncate file to half size --SKIPIF-- --FILE-- --EXPECT-- *** Testing ftruncate() : usage variations *** -- Testing ftruncate() with file having data of type numeric -- -- Testing ftruncate() with file opening using r mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(false) int(0) bool(false) int(1024) -- Testing ftruncate() with file opening using rb mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(false) int(0) bool(false) int(1024) -- Testing ftruncate() with file opening using rt mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(false) int(0) bool(false) int(1024) -- Testing ftruncate() with file opening using r+ mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using r+b mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using r+t mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using w mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using wb mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using wt mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using w+ mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using w+b mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using w+t mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using x mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using xb mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using xt mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using x+ mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using x+b mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using x+t mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using a mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using ab mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using at mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using a+ mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using a+b mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using a+t mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file having data of type text_with_new_line -- -- Testing ftruncate() with file opening using r mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(false) int(0) bool(false) int(1024) -- Testing ftruncate() with file opening using rb mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(false) int(0) bool(false) int(1024) -- Testing ftruncate() with file opening using rt mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(false) int(0) bool(false) int(1024) -- Testing ftruncate() with file opening using r+ mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using r+b mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using r+t mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using w mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using wb mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using wt mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1137) int(0) bool(true) int(0) bool(false) int(568) -- Testing ftruncate() with file opening using w+ mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using w+b mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using w+t mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1137) int(0) bool(true) int(0) bool(false) int(568) -- Testing ftruncate() with file opening using x mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using xb mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using xt mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1137) int(0) bool(true) int(0) bool(false) int(568) -- Testing ftruncate() with file opening using x+ mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using x+b mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using x+t mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1137) int(0) bool(true) int(0) bool(false) int(568) -- Testing ftruncate() with file opening using a mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using ab mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using at mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using a+ mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using a+b mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) -- Testing ftruncate() with file opening using a+t mode -- -- Testing ftruncate(): truncate file to half of its current size -- int(1024) int(0) bool(true) int(0) bool(false) int(512) Done