From 0b9d80861aa7a49eda081b6d9b7002f83f5017b0 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Fri, 15 Aug 2008 19:01:09 +0000 Subject: [PATCH] - fix test - add debug build mode (crt outputs callback for invalid parameters) --- .../file/popen_pclose_error-win32-debug.phpt | 61 +++++++++++++++++++ .../tests/file/popen_pclose_error-win32.phpt | 6 +- 2 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 ext/standard/tests/file/popen_pclose_error-win32-debug.phpt diff --git a/ext/standard/tests/file/popen_pclose_error-win32-debug.phpt b/ext/standard/tests/file/popen_pclose_error-win32-debug.phpt new file mode 100644 index 0000000000..2c04f52447 --- /dev/null +++ b/ext/standard/tests/file/popen_pclose_error-win32-debug.phpt @@ -0,0 +1,61 @@ +--TEST-- +Test popen() and pclose function: error conditions + +--SKIPIF-- + + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +*** Testing for error conditions *** + +Warning: popen() expects exactly 2 parameters, 0 given in %s on line %d +NULL + +Warning: popen() expects exactly 2 parameters, 1 given in %s on line %d +NULL + +Warning: Invalid parameter detected in CRT function '_fdopen' (%s:%d) in %s on line %d + +Warning: popen(abc.txt,rw): Invalid argument in %s on line %d +bool(false) + +Warning: pclose() expects exactly 1 parameter, 0 given in %s on line %d +bool(false) + +Warning: pclose() expects exactly 1 parameter, 2 given in %s on line %d +bool(false) + +Warning: pclose() expects parameter 1 to be resource, integer given in %s on line %d +bool(false) + +--- Done ---'abc.txt' is not recognized as an internal or external command, +operable program or batch file. diff --git a/ext/standard/tests/file/popen_pclose_error-win32.phpt b/ext/standard/tests/file/popen_pclose_error-win32.phpt index 9b6944581c..f9e4b0eab9 100644 --- a/ext/standard/tests/file/popen_pclose_error-win32.phpt +++ b/ext/standard/tests/file/popen_pclose_error-win32.phpt @@ -3,8 +3,10 @@ Test popen() and pclose function: error conditions --SKIPIF-- --FILE-- -- 2.50.1