--TEST-- Test ftruncate() function : usage variations - truncate file to smaller 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 to smaller size and display the file content -- int(1024) int(0) int(0) bool(false) int(1024) -- Testing ftruncate() with file opening using rb mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) int(0) bool(false) int(1024) -- Testing ftruncate() with file opening using rt mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) int(0) bool(false) int(1024) -- Testing ftruncate() with file opening using r+ mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using r+b mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using r+t mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using w mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using wb mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using wt mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using w+ mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using w+b mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using w+t mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using x mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using xb mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using xt mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using x+ mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using x+b mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using x+t mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using a mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using ab mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using at mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using a+ mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using a+b mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using a+t mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "222222222222222" int(0) bool(false) int(15) -- Testing ftruncate() with file having data of type text_with_new_line -- -- Testing ftruncate() with file opening using r mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) int(0) bool(false) int(1024) -- Testing ftruncate() with file opening using rb mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) int(0) bool(false) int(1024) -- Testing ftruncate() with file opening using rt mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) int(0) bool(false) int(1024) -- Testing ftruncate() with file opening using r+ mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "line line of te" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using r+b mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "line line of te" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using r+t mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "line line of te" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using w mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "line line of te" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using wb mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "line line of te" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using wt mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1137) int(0) File content after truncating file to 15 size : string(15) "line line of t" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using w+ mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "line line of te" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using w+b mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "line line of te" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using w+t mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1137) int(0) File content after truncating file to 15 size : string(15) "line line of t" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using x mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "line line of te" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using xb mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "line line of te" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using xt mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1137) int(0) File content after truncating file to 15 size : string(15) "line line of t" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using x+ mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "line line of te" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using x+b mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "line line of te" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using x+t mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1137) int(0) File content after truncating file to 15 size : string(15) "line line of t" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using a mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "line line of te" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using ab mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "line line of te" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using at mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "line line of te" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using a+ mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "line line of te" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using a+b mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "line line of te" int(0) bool(false) int(15) -- Testing ftruncate() with file opening using a+t mode -- -- Testing ftruncate(): truncate to smaller size and display the file content -- int(1024) int(0) File content after truncating file to 15 size : string(15) "line line of te" int(0) bool(false) int(15) Done