summaryrefslogtreecommitdiff
path: root/tests/quicktester.inc
diff options
context:
space:
mode:
authorSVN Migration <svn@php.net>2001-08-12 04:31:15 +0000
committerSVN Migration <svn@php.net>2001-08-12 04:31:15 +0000
commit64da1e7f4e0c11b32a07812abf15b264666a7160 (patch)
tree94164a4d7fdbe2c473d432fdde13da21f614a14d /tests/quicktester.inc
parentff39e51fdf5b17a20b4ac447e66c3048f03c29d3 (diff)
downloadphp-git-BEFORE_EXP_MERGE.tar.gz
This commit was manufactured by cvs2svn to create tag 'BEFORE_EXP_MERGE'.BEFORE_EXP_MERGE
Diffstat (limited to 'tests/quicktester.inc')
-rw-r--r--tests/quicktester.inc35
1 files changed, 0 insertions, 35 deletions
diff --git a/tests/quicktester.inc b/tests/quicktester.inc
deleted file mode 100644
index 08e3c0a40f..0000000000
--- a/tests/quicktester.inc
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
- /*
- Helper for simple tests to check return-value. Usage:
-
- $tests = <<<TESTS
- expected_return_value === expression
- 2 === 1+1
- 4 === 2*2
- FALSE === @ fopen('non_existent_file')
-TESTS;
- include( '../../../(../)tests/quicktester.inc' );
-
- Expect: OK
-
- Remember to NOT put a trailing ; after a line!
-
- */
- error_reporting(E_ALL);
- $tests = explode("\n",$tests);
- $success = TRUE;
- foreach ($tests as $test)
- {
- $res = eval("return ($test);");
- $success = $success && $res;
- if (!$res)
- {
- echo "\nAssert failed:\n";
- echo "$test\n";
- list($left,$right) = explode('===',$test);
- echo "Left: ";var_dump(eval("return ($left );"));
- echo "Right: ";var_dump(eval("return ($right);"));
- }
- }
- if ($success) echo "OK";
-