Permalink
Browse files

-testing the tests

-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
  • Loading branch information...
1 parent abdf302 commit 2b927548d3524903b03866f90892bf405db25aec Marcus Boerger committed Nov 4, 2002
@@ -0,0 +1,6 @@
+--TEST--
+EXPECT
+--FILE--
+abc
+--EXPECT--
+abc
@@ -0,0 +1,18 @@
+--TEST--
+EXPECTF
+--FILE--
+123
+-123
++123
++1.1
+abc
+0abc
+x
+--EXPECTF--
+%d
+%i
+%i
+%f
+%s
+%x
+%c
@@ -0,0 +1,6 @@
+--TEST--
+EXPECTREGEX
+--FILE--
+abcde12314235xyz34264768286abcde
+--EXPECTREGEX--
+[abcde]+[0-5]*xyz[2-8]+abcde
@@ -0,0 +1,10 @@
+--TEST--
+INI section allows '='
+--INI--
+arg_separator.input==
+--FILE--
+<?php
+var_dump(ini_get('arg_separator.input'));
+?>
+--EXPECT--
+string(1) "="
@@ -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"
@@ -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.*
File renamed without changes.

0 comments on commit 2b92754

Please sign in to comment.