]> granicus.if.org Git - php/commitdiff
-testing the tests
authorMarcus Boerger <helly@php.net>
Mon, 4 Nov 2002 10:43:22 +0000 (10:43 +0000)
committerMarcus Boerger <helly@php.net>
Mon, 4 Nov 2002 10:43:22 +0000 (10:43 +0000)
-moved tests/dirname.phpt to tests/run-test/test007.phpt because many
 tests use this to find their additional files.
-no more tests in tests directly only in subdirectories

tests/run-test/test001.phpt [new file with mode: 0644]
tests/run-test/test002.phpt [new file with mode: 0644]
tests/run-test/test003.phpt [new file with mode: 0644]
tests/run-test/test004.phpt [new file with mode: 0644]
tests/run-test/test005.phpt [new file with mode: 0644]
tests/run-test/test006.phpt [new file with mode: 0644]
tests/run-test/test007.phpt [moved from tests/dirname.phpt with 100% similarity]

diff --git a/tests/run-test/test001.phpt b/tests/run-test/test001.phpt
new file mode 100644 (file)
index 0000000..370d09c
--- /dev/null
@@ -0,0 +1,6 @@
+--TEST--
+EXPECT
+--FILE--
+abc
+--EXPECT--
+abc
\ No newline at end of file
diff --git a/tests/run-test/test002.phpt b/tests/run-test/test002.phpt
new file mode 100644 (file)
index 0000000..7b91f35
--- /dev/null
@@ -0,0 +1,18 @@
+--TEST--
+EXPECTF
+--FILE--
+123
+-123
++123
++1.1
+abc
+0abc
+x
+--EXPECTF--
+%d
+%i
+%i
+%f
+%s
+%x
+%c
\ No newline at end of file
diff --git a/tests/run-test/test003.phpt b/tests/run-test/test003.phpt
new file mode 100644 (file)
index 0000000..c1afad1
--- /dev/null
@@ -0,0 +1,6 @@
+--TEST--
+EXPECTREGEX
+--FILE--
+abcde12314235xyz34264768286abcde
+--EXPECTREGEX--
+[abcde]+[0-5]*xyz[2-8]+abcde
\ No newline at end of file
diff --git a/tests/run-test/test004.phpt b/tests/run-test/test004.phpt
new file mode 100644 (file)
index 0000000..19dbded
--- /dev/null
@@ -0,0 +1,10 @@
+--TEST--
+INI section allows '='
+--INI--
+arg_separator.input==
+--FILE--
+<?php
+var_dump(ini_get('arg_separator.input'));
+?>
+--EXPECT--
+string(1) "="
\ No newline at end of file
diff --git a/tests/run-test/test005.phpt b/tests/run-test/test005.phpt
new file mode 100644 (file)
index 0000000..04f6210
--- /dev/null
@@ -0,0 +1,28 @@
+--TEST--
+Error message handling
+--FILE--
+<?php
+// If this test fails ask the developers of run-test.php
+//
+// We check the general ini settings which affect error handling
+// and than verify if a message is given by a division by zero.
+// EXPECTF is used here since the error format may change but ut 
+// should always contain 'Division by zero'.
+var_dump(ini_get('display_errors'));
+var_dump(ini_get('error_reporting'));
+var_dump(ini_get('log_errors'));
+var_dump(ini_get('track_errors'));
+ini_set('display_errors', 0);
+var_dump(ini_get('display_errors'));
+var_dump($php_errormsg);
+$error = 1 / 0;
+var_dump($php_errormsg);
+?>
+--EXPECTF--
+string(1) "1"
+string(4) "2047"
+string(1) "0"
+string(1) "1"
+string(1) "0"
+NULL
+string(%d) "%sivision by zer%s"
diff --git a/tests/run-test/test006.phpt b/tests/run-test/test006.phpt
new file mode 100644 (file)
index 0000000..4dca66a
--- /dev/null
@@ -0,0 +1,9 @@
+--TEST--
+Error messages are shown
+--FILE--
+<?php
+// If this test fails ask the developers of run-test.php
+$error = 1 / 0;
+?>
+--EXPECTREGEX--
+.*Division by zero.*