From: andy wharmby Date: Thu, 11 Jun 2009 12:30:57 +0000 (+0000) Subject: New POISX tests. Tested on Windows (all test SKIP), Linux and Linux 64 X-Git-Tag: php-5.2.10~34 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32c8f50ea9dc0ea65ed22d34ec00dadbae7f87bb;p=php New POISX tests. Tested on Windows (all test SKIP), Linux and Linux 64 --- diff --git a/ext/posix/tests/posix_getcwd_basic.phpt b/ext/posix/tests/posix_getcwd_basic.phpt new file mode 100644 index 0000000000..6dbed50497 --- /dev/null +++ b/ext/posix/tests/posix_getcwd_basic.phpt @@ -0,0 +1,22 @@ +--TEST-- +posix_getcwd(): Basic tests +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECTF-- +Basic test of POSIX posix_getcwd function +string(%d) "%s" + +Warning: Wrong parameter count for posix_getcwd() in %s on line %d +NULL +===DONE=== diff --git a/ext/posix/tests/posix_getgrgid_basic.phpt b/ext/posix/tests/posix_getgrgid_basic.phpt new file mode 100644 index 0000000000..866e11681a --- /dev/null +++ b/ext/posix/tests/posix_getgrgid_basic.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test posix_getgrgid() function : basic functionality +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECTF-- +Basic test of POSIX getgid and getgrid fucntions +Array +( + [name] => %s + [passwd] => %s + [members] => Array +%a + + [gid] => %d +) +===DONE=== + \ No newline at end of file diff --git a/ext/posix/tests/posix_getgrnam_basic.phpt b/ext/posix/tests/posix_getgrnam_basic.phpt new file mode 100644 index 0000000000..fd5bf23172 --- /dev/null +++ b/ext/posix/tests/posix_getgrnam_basic.phpt @@ -0,0 +1,23 @@ +--TEST-- +posix_getgrnam(): Basic tests +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +Basic test of POSIX posix_getgrnam function +bool(false) +bool(false) +bool(false) +===DONE=== \ No newline at end of file diff --git a/ext/posix/tests/posix_getgroups_basic.phpt b/ext/posix/tests/posix_getgroups_basic.phpt new file mode 100644 index 0000000000..f062468b4f --- /dev/null +++ b/ext/posix/tests/posix_getgroups_basic.phpt @@ -0,0 +1,24 @@ +--TEST-- +Test posix_getgroups() function : basic functionality +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +Basic test of POSIX getgroups +TEST PASSED +===DONE=== \ No newline at end of file diff --git a/ext/posix/tests/posix_getpgid_basic.phpt b/ext/posix/tests/posix_getpgid_basic.phpt new file mode 100644 index 0000000000..3195387b75 --- /dev/null +++ b/ext/posix/tests/posix_getpgid_basic.phpt @@ -0,0 +1,23 @@ +--TEST-- +Test posix_getpgid() function : basic functionality +--SKIPIF-- + +--FILE-- + +===DONE==== +--EXPECTF-- +Basic test of posix_getpgid function +int(%d) +===DONE==== + + \ No newline at end of file diff --git a/ext/posix/tests/posix_getpgrp_basic.phpt b/ext/posix/tests/posix_getpgrp_basic.phpt new file mode 100644 index 0000000000..a737019a2f --- /dev/null +++ b/ext/posix/tests/posix_getpgrp_basic.phpt @@ -0,0 +1,21 @@ +--TEST-- +Test posix_getpgrp() function : basic functionality +--SKIPIF-- + +--FILE-- + +===DONE==== +--EXPECTF-- +Basic test of POSIX getpgrp function +int(%d) +===DONE==== + \ No newline at end of file diff --git a/ext/posix/tests/posix_getpid_basic.phpt b/ext/posix/tests/posix_getpid_basic.phpt new file mode 100644 index 0000000000..a1444413ed --- /dev/null +++ b/ext/posix/tests/posix_getpid_basic.phpt @@ -0,0 +1,21 @@ +--TEST-- +Test posix_getpid() function : basic functionality +--SKIPIF-- + +--FILE-- + +===DONE==== +--EXPECTF-- +Basic test of POSIX getpid function +int(%d) +===DONE==== + \ No newline at end of file diff --git a/ext/posix/tests/posix_getppid_basic.phpt b/ext/posix/tests/posix_getppid_basic.phpt new file mode 100644 index 0000000000..2da591c177 --- /dev/null +++ b/ext/posix/tests/posix_getppid_basic.phpt @@ -0,0 +1,21 @@ +--TEST-- +Test posix_getppid() function : basic functionality +--SKIPIF-- + +--FILE-- + +===DONE==== +--EXPECTF-- +Basic test of POSIX getppid function +int(%d) +===DONE==== + \ No newline at end of file diff --git a/ext/posix/tests/posix_getpwnam_basic.phpt b/ext/posix/tests/posix_getpwnam_basic.phpt new file mode 100644 index 0000000000..d675d6c182 --- /dev/null +++ b/ext/posix/tests/posix_getpwnam_basic.phpt @@ -0,0 +1,23 @@ +--TEST-- +posix_getpwnam(): Basic tests +--SKIPIF-- + +--FILE-- + +===DONE==== +--EXPECT-- +Basic test of POSIX posix_getpwnam function +bool(false) +bool(false) +bool(false) +===DONE==== diff --git a/ext/posix/tests/posix_getpwuid_basic.phpt b/ext/posix/tests/posix_getpwuid_basic.phpt new file mode 100644 index 0000000000..1bcd59d0e6 --- /dev/null +++ b/ext/posix/tests/posix_getpwuid_basic.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test posix_getpwuid() function : basic functionality +--SKIPIF-- + +--FILE-- + +===DONE==== +--EXPECTREGEX-- +Basic test of POSIX getpwuid +Array +\( + \[name\] => [^\r\n]+ + \[passwd\] => [^\r\n]+ + \[uid\] => [0-9]+ + \[gid\] => [0-9]+ + \[gecos\] => [^\r\n]* + \[dir\] => [^\r\n]+ + \[shell\] => [^\r\n]+ +\) +===DONE==== \ No newline at end of file diff --git a/ext/posix/tests/posix_getrlimit_basic.phpt b/ext/posix/tests/posix_getrlimit_basic.phpt new file mode 100644 index 0000000000..7fdd0e7e4b --- /dev/null +++ b/ext/posix/tests/posix_getrlimit_basic.phpt @@ -0,0 +1,20 @@ +--TEST-- +posix_getrlimit(): Basic tests +--SKIPIF-- + +--FILE-- + +===DONE==== +--EXPECTF-- +Basic test of POSIX posix_getrlimit function +array(%d) { +%a +} +===DONE==== \ No newline at end of file diff --git a/ext/posix/tests/posix_getsid_basic.phpt b/ext/posix/tests/posix_getsid_basic.phpt new file mode 100644 index 0000000000..a53e1df8b3 --- /dev/null +++ b/ext/posix/tests/posix_getsid_basic.phpt @@ -0,0 +1,22 @@ +--TEST-- +Test posix_getsid() function : basic functionality +--SKIPIF-- + +--FILE-- + +===DONE==== +--EXPECTF-- +Basic test of posix_getsid function +int(%d) +===DONE==== + \ No newline at end of file diff --git a/ext/posix/tests/posix_initgroups_basic.phpt b/ext/posix/tests/posix_initgroups_basic.phpt new file mode 100644 index 0000000000..4a5005998e --- /dev/null +++ b/ext/posix/tests/posix_initgroups_basic.phpt @@ -0,0 +1,22 @@ +--TEST-- +posix_initgroups(): Basic tests +--SKIPIF-- + +--FILE-- + +===DONE==== +--EXPECTF-- +Basic test of POSIX posix_initgroups function + +Warning: posix_initgroups() expects parameter 2 to be long, string given in %s on line %d +bool(false) +bool(false) +===DONE==== diff --git a/ext/posix/tests/posix_kill_basic.phpt b/ext/posix/tests/posix_kill_basic.phpt new file mode 100644 index 0000000000..c995031af4 --- /dev/null +++ b/ext/posix/tests/posix_kill_basic.phpt @@ -0,0 +1,39 @@ +--TEST-- +Test posix_kill(), posix_get_last_error and posix_strerror() functions : basic functionality +--SKIPIF-- + +--FILE-- + +===DONE==== +--EXPECTF-- +Basic test of POSIX getpgid(), kill(), get_last_error() and strerror() functions +Kill pid=%d +bool(false) +int(%d) +string(%d) %sNo such process%s +===DONE==== + \ No newline at end of file diff --git a/ext/posix/tests/posix_mknod_basic.phpt b/ext/posix/tests/posix_mknod_basic.phpt new file mode 100644 index 0000000000..bc35156460 --- /dev/null +++ b/ext/posix/tests/posix_mknod_basic.phpt @@ -0,0 +1,18 @@ +--TEST-- +posix_mknod(): Basic tests +--SKIPIF-- + +--FILE-- + +===DONE==== +--EXPECT-- +Basic test of POSIX posix_mknod function +bool(false) +===DONE==== \ No newline at end of file diff --git a/ext/posix/tests/posix_strerror_error_basic.phpt b/ext/posix/tests/posix_strerror_error_basic.phpt new file mode 100644 index 0000000000..3359e0fe2a --- /dev/null +++ b/ext/posix/tests/posix_strerror_error_basic.phpt @@ -0,0 +1,46 @@ +--TEST-- +Test posix_strerror() function : error conditions +--SKIPIF-- + +--FILE-- + +===DONE==== +--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(%d) "Unknown error%s" +===DONE==== \ No newline at end of file diff --git a/ext/posix/tests/posix_times_basic.phpt b/ext/posix/tests/posix_times_basic.phpt new file mode 100644 index 0000000000..eb8af10df4 --- /dev/null +++ b/ext/posix/tests/posix_times_basic.phpt @@ -0,0 +1,37 @@ +--TEST-- +Test posix_times() function : basic functionality +--SKIPIF-- + +--FILE-- + +===DONE==== +--EXPECTF-- +Basic test of POSIX times function +array(5) { + ["ticks"]=> + int(%d) + ["utime"]=> + int(%d) + ["stime"]=> + int(%d) + ["cutime"]=> + int(%d) + ["cstime"]=> + int(%d) +} +===DONE==== diff --git a/ext/posix/tests/posix_uname_basic.phpt b/ext/posix/tests/posix_uname_basic.phpt new file mode 100644 index 0000000000..7dd378192e --- /dev/null +++ b/ext/posix/tests/posix_uname_basic.phpt @@ -0,0 +1,28 @@ +--TEST-- +Test posix_uname() function : basic functionality +--SKIPIF-- + +--FILE-- + +===DONE==== +--EXPECTF-- +Basic test of POSIX uname function +Array +( + [sysname] => %s + [nodename] => %s + [release] => %s + [version] => %s + [machine] => %s +) +===DONE==== + \ No newline at end of file