You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Melvyn Sopacua 6dde848d9e Sorry, shouldn't use undo on packetloss connections 24 years ago
..
basic Test argument passing for CLI 24 years ago
classes - Convert cfunction -> function. 25 years ago
func - Fix descriptions 24 years ago
lang Sorry, shouldn't use undo on packetloss connections 24 years ago
strings - Drop requirement for php.ini-dist 24 years ago
README changed run-tests.php to use 'php -q' instead of 'php -f' 25 years ago
bin-info.inc Fix PHP version and sapi printed so that it does not print bogus 24 years ago
dirname.phpt dirname() checks that work for both Unix and Win32. 24 years ago
foo More cleanup. 27 years ago
foo2 More cleanup. 27 years ago
foo3 More cleanup. 27 years ago
foo4 Testing. 26 years ago
odbc-display.php Test scripts for ODBC added 26 years ago
odbc-t1.php Test scripts for ODBC added 26 years ago
odbc-t2.php Test scripts for ODBC added 26 years ago
odbc-t3.php Test scripts for ODBC added 26 years ago
odbc-t4.php Test scripts for ODBC added 26 years ago
odbc-t5.php Test scripts for ODBC added 26 years ago
quicktester.inc - Fixed the bz2 tests. (and changed the usage comment to be correct) 24 years ago
recurse - Make Win32 compile again 26 years ago
run.html - Fix some issues with the ISAPI module, made it friendlier to non Win32 platforms 26 years ago
run.php - Fix some issues with the ISAPI module, made it friendlier to non Win32 platforms 26 years ago
scan_cases PHP code to test sscanf() 26 years ago
test.php4 test 27 years ago
test.pl Reduce clutter a bit. 27 years ago
test_class_inheritance Reduce clutter a bit. 27 years ago
testarray test 26 years ago
testarray.pl Reduce clutter a bit. 27 years ago
testarray2 test 26 years ago
testarray2.pl Reduce clutter a bit. 27 years ago
testclassfunc mailing list test 27 years ago
testcom Object overloading API changed slightly (llist is now a pointer) 26 years ago
testcpdf - extended test script for cpdf by GD image insertion 26 years ago
testcpdfclock - The pdfclock example using cpdf 26 years ago
testdom - test script for rewritten domxml module 25 years ago
testfe testing 27 years ago
testfunc Another test. 26 years ago
testfunc.pl Reduce clutter a bit. 27 years ago
testfunc2 - Get rid of warning 27 years ago
testfunc2.pl Reduce clutter a bit. 27 years ago
testfuncref - Converted math.c to use new convert_to_number_ex() macro. 27 years ago
testhyperwave - add test for hw_insertanchors() 25 years ago
testinclude bonsai test 26 years ago
testobj test 26 years ago
testpfpro.php test file for pfpro 26 years ago
tests.dsp Win32 project and makefile used to invoke run-tests.php 24 years ago
tests.mak Add TEST_PHP_DETAILED usage for verbose test runs. 24 years ago
testscanf.php PHP code to test sscanf() 26 years ago
testswf - test script to test creation of flash files 26 years ago

README

PHP Regression Tests
====================

To run the tests, go to the top-level directory and
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 -q run-tests.php tests/lang".

To run one or more single tests, pass them as parameters:
"./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
contains the description of the test. The Skipif section contains
code that should print "skip" if this test should be skipped for some
reason (such as an extension that is not compiled in). The Post
section contains any post data that the script might need. The Get
section contains any Get data. Note that both the Post and the Get
sections need to have this data in url-encoded format. The File
section contains the actual script and the Expect section is the
expected output, sans headers. Blank lines are ignored in the
expected output.

A simple example which takes one argument through the POST method
and one through the GET and displays these would be:

--TEST--
Simple GET and POST test
--SKIPIF--
--POST--
a=Hello
--GET--
b=There
--FILE--
<?php echo "$a $b">
--EXPECT--
Hello There

Another simple example that only runs if the PCRE extension is loaded:

--TEST--
Simple Perl regexp test
--SKIPIF--
<?php if (!extension_loaded("pcre")) print "skip"; ?>
--POST--
--GET--
--FILE--
<?php
$str="Hello 42 World";
if (pcre_match('/^([a-z]+)\s+(\d+)\s+([a-z]+)/i', $str, $matches)) {
printf("%s %s: %d\n", $matches[1], $matches[3], $matches[2]);
}
?>
--EXPECT--
Hello World: 42