From: Steve Seear Date: Fri, 11 Apr 2008 09:33:08 +0000 (+0000) Subject: POSIX extension error tests X-Git-Tag: BEFORE_NEW_PARAMETER_PARSE~395 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ca3391f44c0285bf2717c2ab2273745bde572889;p=php POSIX extension error tests --- diff --git a/ext/posix/tests/posix_get_last_error_error.phpt b/ext/posix/tests/posix_get_last_error_error.phpt new file mode 100644 index 0000000000..6cf2161d0c --- /dev/null +++ b/ext/posix/tests/posix_get_last_error_error.phpt @@ -0,0 +1,31 @@ +--TEST-- +Test posix_get_last_error() function : error conditions +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing posix_get_last_error() : error conditions *** + +-- Testing posix_get_last_error() function with one argument -- + +Warning: posix_get_last_error() expects exactly 0 parameters, 1 given in %s on line %d +NULL +Done diff --git a/ext/posix/tests/posix_getgid_error.phpt b/ext/posix/tests/posix_getgid_error.phpt new file mode 100644 index 0000000000..bcd7a2fbdf --- /dev/null +++ b/ext/posix/tests/posix_getgid_error.phpt @@ -0,0 +1,31 @@ +--TEST-- +Test posix_getgid() function : error conditions +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing posix_getgid() : error conditions *** + +-- Testing posix_getgid() function with one argument -- + +Warning: posix_getgid() expects exactly 0 parameters, 1 given in %s on line %d +NULL +Done diff --git a/ext/posix/tests/posix_getgrgid_error.phpt b/ext/posix/tests/posix_getgrgid_error.phpt new file mode 100644 index 0000000000..bce624f45e --- /dev/null +++ b/ext/posix/tests/posix_getgrgid_error.phpt @@ -0,0 +1,53 @@ +--TEST-- +Test posix_getgrgid() function : error conditions +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing posix_getgrgid() : error conditions *** + +-- Testing posix_getgrgid() function with Zero arguments -- + +Warning: posix_getgrgid() expects exactly 1 parameter, 0 given in %s on line %d +bool(false) + +-- Testing posix_getgrgid() function with more than expected no. of arguments -- + +Warning: posix_getgrgid() expects exactly 1 parameter, 2 given in %s on line %d +bool(false) + +-- Testing posix_getgrgid() function with a negative group id -- +bool(false) +Done diff --git a/ext/posix/tests/posix_getpgid_error.phpt b/ext/posix/tests/posix_getpgid_error.phpt new file mode 100644 index 0000000000..e703b8fdc1 --- /dev/null +++ b/ext/posix/tests/posix_getpgid_error.phpt @@ -0,0 +1,48 @@ +--TEST-- +Test posix_getpgid() function : error conditions +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing posix_getpgid() : error conditions *** + +-- Testing posix_getpgid() function no arguments -- + +Warning: posix_getpgid() expects exactly 1 parameter, 0 given in %s on line %d +bool(false) + +-- Testing posix_getpgid() with one extra argument -- + +Warning: posix_getpgid() expects exactly 1 parameter, 2 given in %s on line %d +bool(false) + +-- Testing posix_getpgid() with negative pid -- +bool(false) +Done diff --git a/ext/posix/tests/posix_getpgrp_error.phpt b/ext/posix/tests/posix_getpgrp_error.phpt new file mode 100644 index 0000000000..97f47ce8ca --- /dev/null +++ b/ext/posix/tests/posix_getpgrp_error.phpt @@ -0,0 +1,31 @@ +--TEST-- +Test posix_getpgrp() function : error conditions +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing posix_getpgrp() : error conditions *** + +-- Testing posix_getpgrp() function with one argument -- + +Warning: posix_getpgrp() expects exactly 0 parameters, 1 given in %s on line %d +NULL +Done diff --git a/ext/posix/tests/posix_getpid_error.phpt b/ext/posix/tests/posix_getpid_error.phpt new file mode 100644 index 0000000000..721bf66996 --- /dev/null +++ b/ext/posix/tests/posix_getpid_error.phpt @@ -0,0 +1,31 @@ +--TEST-- +Test posix_getpid() function : error conditions +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing posix_getpid() : error conditions *** + +-- Testing posix_getpid() function with one argument -- + +Warning: posix_getpid() expects exactly 0 parameters, 1 given in %s on line %d +NULL +Done diff --git a/ext/posix/tests/posix_getppid_error.phpt b/ext/posix/tests/posix_getppid_error.phpt new file mode 100644 index 0000000000..366c1ed8dc --- /dev/null +++ b/ext/posix/tests/posix_getppid_error.phpt @@ -0,0 +1,31 @@ +--TEST-- +Test posix_getppid() function : error conditions +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing posix_getppid() : error conditions *** + +-- Testing posix_getppid() function with one argument -- + +Warning: posix_getppid() expects exactly 0 parameters, 1 given in %s on line %d +NULL +Done diff --git a/ext/posix/tests/posix_getpwuid_error.phpt b/ext/posix/tests/posix_getpwuid_error.phpt new file mode 100644 index 0000000000..4920e4e9da --- /dev/null +++ b/ext/posix/tests/posix_getpwuid_error.phpt @@ -0,0 +1,46 @@ +--TEST-- +Test posix_getpwuid() function : error conditions +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing posix_getpwuid() : error conditions *** + +-- Testing posix_getpwuid() function with Zero arguments -- + +Warning: posix_getpwuid() expects exactly 1 parameter, 0 given in %s on line %d +bool(false) + +-- Testing posix_getpwuid() function with more than expected no. of arguments -- + +Warning: posix_getpwuid() expects exactly 1 parameter, 2 given in %s on line %d +bool(false) + +-- Testing posix_getpwuid() function negative uid -- +bool(false) +Done diff --git a/ext/posix/tests/posix_getuid_error.phpt b/ext/posix/tests/posix_getuid_error.phpt new file mode 100644 index 0000000000..e759e68bf5 --- /dev/null +++ b/ext/posix/tests/posix_getuid_error.phpt @@ -0,0 +1,31 @@ +--TEST-- +Test posix_getuid() function : error conditions +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing posix_getuid() : error conditions *** + +-- Testing posix_getuid() function with one argument -- + +Warning: posix_getuid() expects exactly 0 parameters, 1 given in %s on line %d +NULL +Done diff --git a/ext/posix/tests/posix_kill_error.phpt b/ext/posix/tests/posix_kill_error.phpt new file mode 100644 index 0000000000..082b21d6ad --- /dev/null +++ b/ext/posix/tests/posix_kill_error.phpt @@ -0,0 +1,59 @@ +--TEST-- +Test posix_kill() function : error conditions +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing posix_kill() : error conditions *** + +-- Testing posix_kill() function with more than expected no. of arguments -- + +Warning: posix_kill() expects exactly 2 parameters, 3 given in %s on line %d +bool(false) + +-- Testing posix_kill() function with less than expected no. of arguments -- + +Warning: posix_kill() expects exactly 2 parameters, 1 given in %s on line %d +bool(false) + +-- Testing posix_kill() function with invalid signal -- +bool(false) + +-- Testing posix_kill() function with negative pid -- +bool(false) +Done diff --git a/ext/posix/tests/posix_strerror_error.phpt b/ext/posix/tests/posix_strerror_error.phpt new file mode 100644 index 0000000000..231757e671 --- /dev/null +++ b/ext/posix/tests/posix_strerror_error.phpt @@ -0,0 +1,46 @@ +--TEST-- +Test posix_strerror() function : error conditions +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing posix_strerror() : error conditions *** + +-- Testing posix_strerror() function with Zero arguments -- + +Warning: posix_strerror() expects exactly 1 parameter, 0 given in %s on line %d +bool(false) + +-- Testing posix_strerror() function with more than expected no. of arguments -- + +Warning: posix_strerror() expects exactly 1 parameter, 2 given in %s on line %d +bool(false) + +-- Testing posix_strerror() function with invalid error number -- +string(24) "Unknown error 4294966297" +Done diff --git a/ext/posix/tests/posix_times_error.phpt b/ext/posix/tests/posix_times_error.phpt new file mode 100644 index 0000000000..2766bc9483 --- /dev/null +++ b/ext/posix/tests/posix_times_error.phpt @@ -0,0 +1,31 @@ +--TEST-- +Test posix_times() function : error conditions +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing posix_times() : error conditions *** + +-- Testing posix_times() function with one argument -- + +Warning: posix_times() expects exactly 0 parameters, 1 given in %s on line %d +NULL +Done diff --git a/ext/posix/tests/posix_uname_error.phpt b/ext/posix/tests/posix_uname_error.phpt new file mode 100644 index 0000000000..4c753feae4 --- /dev/null +++ b/ext/posix/tests/posix_uname_error.phpt @@ -0,0 +1,31 @@ +--TEST-- +Test posix_uname() function : error conditions +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing posix_uname() : error conditions *** + +-- Testing posix_uname() function with one argument -- + +Warning: posix_uname() expects exactly 0 parameters, 1 given in %s on line %d +NULL +Done