--TEST-- Test fgets() function : usage variations - write only modes (Bug #42036) --FILE-- --EXPECTF-- *** Testing fgets() with file opened in write only mode *** -- File opened in mode : w -- bool(true) int(0) bool(false) Notice: fgets(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d bool(false) int(0) bool(false) -- File opened in mode : wb -- bool(true) int(0) bool(false) Notice: fgets(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d bool(false) int(0) bool(false) -- File opened in mode : wt -- bool(true) int(0) bool(false) Notice: fgets(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d bool(false) int(0) bool(false) -- File opened in mode : a -- bool(true) int(0) bool(false) Notice: fgets(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d bool(false) int(0) bool(false) -- File opened in mode : ab -- bool(true) int(0) bool(false) Notice: fgets(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d bool(false) int(0) bool(false) -- File opened in mode : at -- bool(true) int(0) bool(false) Notice: fgets(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d bool(false) int(0) bool(false) -- File opened in mode : x -- bool(true) int(0) bool(false) Notice: fgets(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d bool(false) int(0) bool(false) -- File opened in mode : xb -- bool(true) int(0) bool(false) Notice: fgets(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d bool(false) int(0) bool(false) -- File opened in mode : xt -- bool(true) int(0) bool(false) Notice: fgets(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d bool(false) int(0) bool(false) Done