From 056130b3ddbc1fd094b49c89df8d340c256fa322 Mon Sep 17 00:00:00 2001 From: Raghubansh Kumar Date: Tue, 10 Jul 2007 07:26:31 +0000 Subject: [PATCH] fix and new test for sunos --- .../tests/file/popen_pclose_error-sunos.phpt | 74 +++++++++++++++++++ .../tests/file/popen_pclose_error.phpt | 8 +- 2 files changed, 78 insertions(+), 4 deletions(-) create mode 100644 ext/standard/tests/file/popen_pclose_error-sunos.phpt diff --git a/ext/standard/tests/file/popen_pclose_error-sunos.phpt b/ext/standard/tests/file/popen_pclose_error-sunos.phpt new file mode 100644 index 0000000000..76b5ac24f9 --- /dev/null +++ b/ext/standard/tests/file/popen_pclose_error-sunos.phpt @@ -0,0 +1,74 @@ +--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 +resource(%d) of type (stream) +sh: abc.txt: not found +Warning: Wrong parameter count for pclose() in %s on line %d +NULL + +Warning: Wrong parameter count for pclose() in %s on line %d +NULL + +Warning: pclose(): supplied argument is not a valid stream resource in %s on line %d +bool(false) + +--- Done --- +--UEXPECTF-- +*** 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 +resource(%d) of type (stream) +sh: abc.txt: not found +Warning: Wrong parameter count for pclose() in %s on line %d +NULL + +Warning: Wrong parameter count for pclose() in %s on line %d +NULL + +Warning: pclose(): supplied argument is not a valid stream resource in %s on line %d +bool(false) + +--- Done --- diff --git a/ext/standard/tests/file/popen_pclose_error.phpt b/ext/standard/tests/file/popen_pclose_error.phpt index fbd139c668..f6932f108e 100644 --- a/ext/standard/tests/file/popen_pclose_error.phpt +++ b/ext/standard/tests/file/popen_pclose_error.phpt @@ -2,8 +2,8 @@ Test popen() and pclose function: error conditions --SKIPIF-- --FILE-- @@ -41,7 +41,7 @@ NULL Warning: popen() expects exactly 2 parameters, 1 given in %s on line %d NULL -Warning: popen(abc.txt,rw): Invalid argument in %s on line %d +Warning: popen(abc.txt,rw): %s on line %d bool(false) Warning: Wrong parameter count for pclose() in %s on line %d @@ -63,7 +63,7 @@ NULL Warning: popen() expects exactly 2 parameters, 1 given in %s on line %d NULL -Warning: popen(abc.txt,rw): Invalid argument in %s on line %d +Warning: popen(abc.txt,rw): %s on line %d bool(false) Warning: Wrong parameter count for pclose() in %s on line %d -- 2.40.0