Commit Graph

47 Commits

Author SHA1 Message Date
George Peter Banyard
b2248789ed Implement 'Saner Numeric Strings' RFC:
RFC: https://wiki.php.net/rfc/saner-numeric-strings

This removes the -1 allow_error mode from is_numeric_string functions and replaces it by
a trailing boolean out argument to preserve BC in a couple of places.

Most of the changes can be resumed to "numeric" strings which emitted a E_NOTICE now emit
a E_WARNING and "numeric" strings which emitted a E_WARNING now throw a TypeError.

This mostly affects:
 - String offsets
 - Arithmetic operations
 - Bitwise operations

Closes GH-5762
2020-07-29 02:51:09 +01:00
Máté Kocsis
d30cd7d7e7
Review the usage of apostrophes in error messages
Closes GH-5590
2020-07-10 21:05:28 +02:00
George Peter Banyard
c803499e23 Remove depreacted curly brace offset syntax
Closes GH-5221
2020-05-22 16:52:17 +02:00
Alex Dowad
bbb8b95dbd Remove duplicate tests
Remove duplicate test (iterator_018.phpt)

This is exactly the same as iterator_011.phpt.

Remove duplicate test (offsets_chaining_2.phpt)

This is exactly the same as offsets_chaining_1.phpt.

Remove duplicate test (offsets_chaining_4.phpt)

This is exactly the same as offsets_chaining_3.phpt.

Remove duplicate test (ReflectionObject_export_basic1.phpt)

This is exactly the same as ReflectionObject___toString_basic1.phpt.

Remove duplicate test (ReflectionObject_export_basic2.phpt)

This is exactly the same as ReflectionObject___toString_basic2.phpt.

Closes GH-5467.
2020-04-27 11:53:57 +02:00
Nikita Popov
f8d795820e Reindent phpt files 2020-02-03 22:52:20 +01:00
kharhamel
82dc9a31c3 Convert warnings to Errors in sprintf() functions
Closes GH-4837.
2019-10-28 11:58:59 +01:00
Nikita Popov
eb766751dc Merge branch 'PHP-7.4' 2019-07-19 10:06:30 +02:00
rjhdby
d574df63dc Deprecate alternative array access syntax
RFC: https://wiki.php.net/rfc/deprecate_curly_braces_array_access
2019-07-19 10:06:10 +02:00
Nikita Popov
db8a4e87a7 Remove error_reporting assignments in some tests 2019-01-30 16:00:19 +01:00
Nikita Popov
c97b9aa226 Always treat needles as strings
This is part of https://wiki.php.net/rfc/deprecations_php_7_3.
2019-01-29 11:10:47 +01:00
Peter Kokot
d679f02295 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:33:09 +02:00
Peter Kokot
d7a3edd45d Trim trailing whitespace in *.phpt 2018-10-14 19:46:15 +02:00
Gabriel Caruso
9c144e0d82
Trim trailing whitespace in tests 2018-10-14 12:07:20 -03:00
Gabriel Caruso
ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Eric Stenson
50377b5bf2 Fix tests expecting specific resource IDs
When Wincache or APC are installed, the resource IDs are not the same.
This is because Wincache takes a few resource objects for itself.  As a
result, these tests become false positives.

On Windows boxes, the microtime precision is not granular enough
to reliably register a difference if two calls to uniqid() are made
concurrently.  This is a fix to the uniqid() test to avoid the false
positive when run on Windows machines.  Also, added a test to exercise
the 'more_entropy' variant of uniqid().
2013-12-13 10:42:32 -08:00
Xinchen Hui
e081c55fb5 Merge branch 'PHP-5.3' into PHP-5.4 2012-10-10 10:31:31 +08:00
Xinchen Hui
610c7fbe7b Remove executable permission on phpt 2012-10-10 10:27:49 +08:00
Stanislav Malyshev
e4f40a3375 fix tests 2011-12-26 01:08:47 +00:00
Xinchen Hui
2fe9f37026 Fix tests 2011-12-19 16:57:36 +00:00
Ferenc Kovacs
6f8518fbf5 adding some tests for string offsets 2011-11-26 18:41:45 +00:00
Ferenc Kovacs
52ddf31284 adding some tests for string offsets 2011-11-26 18:41:45 +00:00
Kalle Sommer Nielsen
9a38f301d6 Remove highlight.bg, it was removed in the old trunk and its not referenced in zend_highlight.c, meaning its not even implemented correctly in 5.3. 2010-04-21 21:56:24 +00:00
Dmitry Stogov
478acfd8b4 . Added support for using static HEREDOCs to initialize static variables and class members or constants. (Matt)
. Improved syntax highlighting and consistency for variables in double-quoted strings and literal text in HEREDOCs and backticks. (Matt)
. Optimized interpolated strings to use one less opcode. (Matt)
2008-07-26 15:30:28 +00:00
Rob Richards
604bfe4c0b MFH: fix test 2008-06-05 08:29:29 +00:00
Ilia Alshanetsky
cce5e8c9ea Updated tests to use [] instead of {} 2005-11-16 15:13:20 +00:00
Ilia Alshanetsky
b0c0b79136 MFH: Fixed test for cygwin installs 2005-10-20 14:43:00 +00:00
Antony Dovgal
ef111b8364 fix test 2005-05-23 11:38:24 +00:00
Ilia Alshanetsky
17c7d35208 Adjust highlight test. 2005-05-22 16:40:26 +00:00
Marcus Boerger
29cfd6d24f - Remove unused blocks 2004-05-19 08:56:50 +00:00
Marcus Boerger
007a076cd0 Fix test 2004-05-18 21:27:08 +00:00
Ilia Alshanetsky
0a38683b14 Correct output. 2004-05-17 20:58:57 +00:00
Ilia Alshanetsky
4e4d861046 Fixed test. 2004-04-24 22:38:51 +00:00
Derick Rethans
f954677e54 - Fix tests after change to highlight_string() 2004-02-25 22:55:47 +00:00
Ilia Alshanetsky
0688205940 Fixed Bug #26703 (Certain characters inside strings incorrectly treated as
keywords). Original patch by vrana@php.net.
2003-12-25 18:57:26 +00:00
Marcus Boerger
717604ea70 Add more tests 2003-12-22 22:53:48 +00:00
Sara Golemon
f22fb07ecd Avoid having output_buffering cause this test to improperly fail. 2003-04-02 01:51:34 +00:00
Wez Furlong
59e4fdcc10 Implement fprintf() and vfprintf().
Add a couple of tests.
2003-01-09 17:29:31 +00:00
Moriyoshi Koizumi
f94e45aaf3 Moved the test into the suitable place 2002-10-31 15:28:21 +00:00
Derick Rethans
d53dd88854 - Drop requirement for php.ini-dist
- Adjust test script to hard code ini settings
2002-10-08 07:49:36 +00:00
Derick Rethans
2ae0e71c97 - Fix highlight_string test. 2002-10-06 17:37:25 +00:00
Derick Rethans
7ad71ed442 - Add highlight_string buffering test 2002-10-03 10:47:47 +00:00
Derick Rethans
141e3d52f7 - Add test for sprintf()'s zero'th argument 2002-03-22 09:09:36 +00:00
Wez Furlong
0f65280cb5 New PHP streams... 2002-03-15 21:03:08 +00:00
Rasmus Lerdorf
334cba47b9 printf argnum (parameter swapping) support from Morten Poulsen 2001-04-09 15:44:24 +00:00
André Langhorst
e35a679e74 more win32 fixes 2001-03-21 12:47:46 +00:00
Hartmut Holzgraefe
f1caba9325 removed LC_* warnin 2001-02-22 18:35:22 +00:00
Stig Bakken
315f4f5658 @PHP 3 regression testing framework re-born (Stig)
Took the old PHP 3 regression testing framework and rewrote it in PHP.
Should work on both Windows and UNIX, however I have not tested it on
Windows.  See tests/README for how to write tests.  Added the PHP 3
tests and converted most of them.
2000-08-27 19:46:06 +00:00