php_config.h stamp-h Makefile build-defs.h php4.spec libphp4.module
test: $(top_builddir)/php
- @$(top_builddir)/php -f $(top_srcdir)/run-tests.php `pwd`
+ @$(top_builddir)/php -q $(top_srcdir)/run-tests.php `pwd`
include $(builddir)/.deps
global $term, $windows_p, $php, $skip, $testdirs, $tmpfile, $opts,
$skipped, $failed, $passed, $total, $term_bold, $term_norm;
- if ($argc > 0) {
- if (is_dir($argv[0])) {
- $dir = $argv[0];
+ if ($argc > 1) {
+ if (is_dir($argv[1])) {
+ $dir = $argv[1];
} else {
- for ($i = 0; $i < $argc; $i++) {
+ for ($i = 1; $i < $argc; $i++) {
switch (run_test($argv[$i])) {
case TEST_SKIPPED:
case TEST_INTERNAL_ERROR:
====================
To run the tests, go to the top-level directory and
-run "./php -f run-tests.php".
+run "./php -q run-tests.php".
Without parameters, "run-tests.php" will recursively scan through the
file tree looking for directories called "tests", and run all the
tests (.phpt files) within (recursively).
To run tests in a single directory, pass the directory as a parameter:
-"./php -f run-tests.php tests/lang".
+"./php -q run-tests.php tests/lang".
To run one or more single tests, pass them as parameters:
-"./php -f run-tests.php tests/lang/015.phpt".
+"./php -q run-tests.php tests/lang/015.phpt".
The format of the .phpt files is quite simple. There are 6 possible
sections. Test, Skipif, Post, Get, File and Expect. The Test section