]> granicus.if.org Git - php/commitdiff
- Coverage++
authorFelipe Pena <felipe@php.net>
Wed, 3 Dec 2008 16:20:59 +0000 (16:20 +0000)
committerFelipe Pena <felipe@php.net>
Wed, 3 Dec 2008 16:20:59 +0000 (16:20 +0000)
ext/posix/tests/posix_getcwd.phpt [new file with mode: 0644]
ext/posix/tests/posix_getgrnam.phpt [new file with mode: 0644]
ext/posix/tests/posix_getpwnam.phpt [new file with mode: 0644]
ext/posix/tests/posix_getrlimit.phpt [new file with mode: 0644]
ext/posix/tests/posix_initgroups.phpt [new file with mode: 0644]
ext/posix/tests/posix_isatty.phpt [new file with mode: 0644]
ext/posix/tests/posix_mknod.phpt [new file with mode: 0644]

diff --git a/ext/posix/tests/posix_getcwd.phpt b/ext/posix/tests/posix_getcwd.phpt
new file mode 100644 (file)
index 0000000..3e60c44
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+posix_getcwd(): Basic tests
+--SKIP--
+<?php if (!posix_mknod('posix_getcwd')) die('skip posix_getcwd() not found'); ?>
+--FILE--
+<?php
+
+var_dump(posix_getcwd());
+var_dump(posix_getcwd(1));
+
+?>
+--EXPECTF--
+string(%d) "%s"
+
+Warning: posix_getcwd() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
diff --git a/ext/posix/tests/posix_getgrnam.phpt b/ext/posix/tests/posix_getgrnam.phpt
new file mode 100644 (file)
index 0000000..89e6080
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+posix_getgrnam(): Basic tests
+--SKIP--
+<?php if (!function_exists('posix_getgrnam')) die('skip posix_getgrnam() not found'); ?>
+--FILE--
+<?php
+
+var_dump(posix_getgrnam(NULL));
+var_dump(posix_getgrnam(1));
+var_dump(posix_getgrnam(''));
+
+?>
+--EXPECT--
+bool(false)
+bool(false)
+bool(false)
diff --git a/ext/posix/tests/posix_getpwnam.phpt b/ext/posix/tests/posix_getpwnam.phpt
new file mode 100644 (file)
index 0000000..2be9752
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+posix_getpwnam(): Basic tests
+--SKIP--
+<?php if (!function_exists('posix_getpwnam')) die('skip posix_getpwnam() not found'); ?>
+--FILE--
+<?php
+
+var_dump(posix_getpwnam(1));
+var_dump(posix_getpwnam(''));
+var_dump(posix_getpwnam(NULL));
+
+?>
+--EXPECT--
+bool(false)
+bool(false)
+bool(false)
diff --git a/ext/posix/tests/posix_getrlimit.phpt b/ext/posix/tests/posix_getrlimit.phpt
new file mode 100644 (file)
index 0000000..5417fe2
--- /dev/null
@@ -0,0 +1,14 @@
+--TEST--
+posix_getrlimit(): Basic tests
+--SKIP--
+<?php if (!function_exists('posix_getrlimit')) die('skip posix_getrlimit() not found'); ?>
+--FILE--
+<?php
+
+var_dump(posix_getrlimit());
+
+?>
+--EXPECTF--
+array(%d) {
+%a
+}
diff --git a/ext/posix/tests/posix_initgroups.phpt b/ext/posix/tests/posix_initgroups.phpt
new file mode 100644 (file)
index 0000000..0b38449
--- /dev/null
@@ -0,0 +1,15 @@
+--TEST--
+posix_initgroups(): Basic tests
+--SKIP--
+<?php if (!function_exists('posix_initgroups')) die('skip posix_initgroups() not found'); ?>
+--FILE--
+<?php
+
+var_dump(posix_initgroups('foo', 'bar'));
+var_dump(posix_initgroups(NULL, NULL));
+
+?>
+--EXPECTF--
+Warning: posix_initgroups() expects parameter 2 to be long, string given in %s on line %d
+bool(false)
+bool(false)
diff --git a/ext/posix/tests/posix_isatty.phpt b/ext/posix/tests/posix_isatty.phpt
new file mode 100644 (file)
index 0000000..b0b86e1
--- /dev/null
@@ -0,0 +1,12 @@
+--TEST--
+posix_isatty(): Basic tests
+--SKIP--
+<?php if (!posix_mknod('posix_isatty')) die('skip posix_isatty() not found'); ?>
+--FILE--
+<?php
+
+var_dump(posix_isatty(0));
+
+?>
+--EXPECTF--
+bool(%s)
diff --git a/ext/posix/tests/posix_mknod.phpt b/ext/posix/tests/posix_mknod.phpt
new file mode 100644 (file)
index 0000000..70c7c28
--- /dev/null
@@ -0,0 +1,12 @@
+--TEST--
+posix_mknod(): Basic tests
+--SKIP--
+<?php if (!posix_mknod('posix_mknod')) die('skip posix_mknod() not found'); ?>
+--FILE--
+<?php
+
+var_dump(posix_mknod(NULL, NULL, NULL, NULL));
+
+?>
+--EXPECT--
+bool(false)