summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2008-12-03 16:20:59 +0000
committerFelipe Pena <felipe@php.net>2008-12-03 16:20:59 +0000
commit3c227429b28178fbaa431941c3c76d2e71093d20 (patch)
treeb30c8df75dc484d43d5729f3b0c3abdbe09c1b0d
parentf23dfd498fbf637f4c4260526398c5e07a7cc260 (diff)
downloadphp-git-3c227429b28178fbaa431941c3c76d2e71093d20.tar.gz
- Coverage++
-rw-r--r--ext/posix/tests/posix_getcwd.phpt16
-rw-r--r--ext/posix/tests/posix_getgrnam.phpt16
-rw-r--r--ext/posix/tests/posix_getpwnam.phpt16
-rw-r--r--ext/posix/tests/posix_getrlimit.phpt14
-rw-r--r--ext/posix/tests/posix_initgroups.phpt15
-rw-r--r--ext/posix/tests/posix_isatty.phpt12
-rw-r--r--ext/posix/tests/posix_mknod.phpt12
7 files changed, 101 insertions, 0 deletions
diff --git a/ext/posix/tests/posix_getcwd.phpt b/ext/posix/tests/posix_getcwd.phpt
new file mode 100644
index 0000000000..3e60c44f72
--- /dev/null
+++ b/ext/posix/tests/posix_getcwd.phpt
@@ -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
index 0000000000..89e60800b6
--- /dev/null
+++ b/ext/posix/tests/posix_getgrnam.phpt
@@ -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
index 0000000000..2be9752abe
--- /dev/null
+++ b/ext/posix/tests/posix_getpwnam.phpt
@@ -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
index 0000000000..5417fe295f
--- /dev/null
+++ b/ext/posix/tests/posix_getrlimit.phpt
@@ -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
index 0000000000..0b38449e72
--- /dev/null
+++ b/ext/posix/tests/posix_initgroups.phpt
@@ -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
index 0000000000..b0b86e10a0
--- /dev/null
+++ b/ext/posix/tests/posix_isatty.phpt
@@ -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
index 0000000000..70c7c28de6
--- /dev/null
+++ b/ext/posix/tests/posix_mknod.phpt
@@ -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)