summaryrefslogtreecommitdiff
path: root/tests/lang
Commit message (Collapse)AuthorAgeFilesLines
* Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1549-57/+0
| | | | | | | | | | | | | | | | | | | | | | | 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
* Trim trailing whitespace in *.phptPeter Kokot2018-10-14163-434/+434
|
* Sync leading and final newlines in source code filesPeter Kokot2018-10-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. 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
* Fix failing tests/lang due to whitespacePeter Kokot2018-10-132-69/+69
|
* Trim trailing whitespace in source code filesPeter Kokot2018-10-134-20/+20
|
* Convert CRLF line endings to LFPeter Kokot2018-10-1372-6419/+6419
| | | | | | | | | | | | | | | | | | | | | | | | This patch simplifies line endings tracked in the Git repository and syncs them to all include the LF style instead of the CRLF files. Newline characters: - LF (\n) (*nix and Mac) - CRLF (\r\n) (Windows) - CR (\r) (old Mac, obsolete) To see which line endings are in the index and in the working copy the following command can be used: `git ls-files --eol` Git additionally provides `.gitattributes` file to specify if some files need to have specific line endings on all platforms (either CRLF or LF). Changed files shouldn't cause issues on modern Windows platforms because also Git can do output conversion is core.autocrlf=true is set on Windows and use CRLF newlines in all files in the working tree. Unless CRLF files are tracked specifically, Git by default tracks all files in the index using LF newlines.
* Merge branch 'PHP-7.0' into PHP-7.1Sara Golemon2017-07-221-0/+29
|\ | | | | | | | | * PHP-7.0: Fix compile-time optimization of NAN comparisons
| * Fix compile-time optimization of NAN comparisonsSara Golemon2017-07-221-0/+29
| |
* | Merge branch 'PHP-7.0' into PHP-7.1Dmitry Stogov2016-11-221-0/+20
|\ \ | |/ | | | | | | * PHP-7.0: Fixed memory leak (Bob)
| * Fixed memory leak (Bob)Dmitry Stogov2016-11-221-0/+20
| |
* | Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2016-10-181-0/+18
|\ \ | |/ | | | | | | * PHP-7.0: Fixed bug #73329 (Float)"Nano" == NAN
| * Fixed bug #73329 (Float)"Nano" == NANAnatol Belski2016-10-181-0/+18
| | | | | | | | | | | | | | The special cases (float)"inf", etc. were never intended and are caused by the updated strtod lib. While it might be nice as an easy way to produce Inf and NaN special values, it was never documented and cause BC breaches.
* | Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2016-09-262-0/+20
|\ \ | |/ | | | | | | * PHP-7.0: Fixed bug #73172 parse error: Invalid numeric literal
| * Fixed bug #73172 parse error: Invalid numeric literalAnatol Belski2016-09-262-0/+20
| |
* | Fix bug #71897Andrea Faulds2016-05-041-0/+16
| |
* | Skip test on ZTS buildDmitry Stogov2016-04-251-0/+1
| |
* | Fixed race conditions in testDmitry Stogov2016-04-251-0/+2
| |
* | Merge branch 'PHP-7.0'Bob Weinand2016-04-161-1/+2
|\ \ | |/
| * Fix non-/Zend tests tooBob Weinand2016-04-161-1/+2
| |
* | Warn about invalid strings in arithmeticAndrea Faulds2016-03-305-36/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit e05d3b67325d4521418483ed924ac9211a188919 Author: Andrea Faulds <ajf@ajf.me> Date: Wed Mar 30 01:43:35 2016 +0100 UPGRADING and NEWS commit 6caf1d4585207d1b02fb06a216cd7da1a1f5e12d Author: Andrea Faulds <ajf@ajf.me> Date: Sun Mar 20 21:18:33 2016 +0000 Fixes commit 6dadb1b0efe5e2ed071e95a55c806519e61377ac Author: Andrea Faulds <ajf@ajf.me> Date: Sun Feb 14 02:15:01 2016 +0000 Add test for numeric string errors in assignment commit bd5f04e8dd576f92a48d25546f4f9a0f57f374de Author: Andrea Faulds <ajf@ajf.me> Date: Sat Feb 13 23:53:05 2016 +0000 Add test for numeric string errors commit c72e92f16d512bcae30cc9639c89bcb08d971742 Author: Andrea Faulds <ajf@ajf.me> Date: Tue Jan 26 23:28:33 2016 +0000 Add test for scientific notation in integer operations commit d94c08852d405b3a7ef6c84d24bf7915c890ce78 Author: Andrea Faulds <ajf@ajf.me> Date: Sun Feb 14 01:25:57 2016 +0000 Disable optimiser evaluation for numeric string errors commit 30ee954ed13d933e766c68605d683c8ebae3d8ee Author: Andrea Faulds <ajf@ajf.me> Date: Sun Feb 14 01:46:25 2016 +0000 fixup commit a6403b79e054c95e2b7345d787f3092b261eed27 Author: Andrea Faulds <ajf@ajf.me> Date: Sat Feb 13 22:00:27 2016 +0000 Do not convert error-causing numeric strings ahead-of-time commit f9dc35401471ef3035954cb6f171826769297548 Author: Andrea Faulds <ajf@ajf.me> Date: Sat Feb 13 19:15:38 2016 +0000 Disable compile-time evaluation for numeric string errors commit e05b0cc8496ea082c6db27efd8b8277ef1f785b5 Author: Andrea Faulds <ajf@ajf.me> Date: Fri Feb 5 11:42:26 2016 +0000 Make _zval_get_long_func_noisy function for inlining commit 84d66321a57e579759109650c8bb7e3d5002854a Author: Andrea Faulds <ajf@ajf.me> Date: Tue Jan 26 23:10:00 2016 +0000 Update tests commit 5ac4a0cc4bff282e3a15eaa8ab44b67391881a6d Author: Andrea Faulds <ajf@ajf.me> Date: Tue Jan 26 22:08:19 2016 +0000 Use is_numeric_string_ex for zval_get_long etc. commit c21f08848533723331012a62a153de3577731d6a Author: Andrea Faulds <ajf@ajf.me> Date: Thu Jan 7 21:13:04 2016 +0000 Update tests commit 63e214cf8160420bfc51c6a2b4ae32f09ad8e8af Author: Andrea Faulds <ajf@ajf.me> Date: Wed Jan 6 00:28:01 2016 +0000 Warn on non-/bad numeric strings in arithmetic
* | strpos()/stripos(): Add support for negative offsetsFrancois Laupretre2016-03-091-2/+3
|/
* Remove mentions of "type hint" and "typehint"Levi Morrison2015-12-241-2/+2
|
* Fix bug #66179Andrea Faulds2015-12-181-2/+2
| | | | | This also fixes ext/standard/tests/general_functions/var_export-locale.phpt to actually run the floating-point section.
* Fixed test (shift operators throw Error)Dmitry Stogov2015-07-061-1/+1
|
* Catch the specifical exceptionXinchen Hui2015-07-036-9/+9
|
* Introduce ArithmeticErrorBob Weinand2015-07-024-399/+399
|
* Use DivisionByZeroError instead of exception for %/intdiv()Bob Weinand2015-07-022-410/+410
|
* Revert "Fixed last previously broken tests"Dmitry Stogov2015-06-294-1089/+1373
| | | | This reverts commit 79b1832dd5086cd9b4a2e778a62f1743b548726c.
* Fixed last previously broken testsBob Weinand2015-06-294-1373/+1089
|
* Merge branch 'master' into throwable-interfaceAaron Piotrowski2015-06-144-4/+4
|\ | | | | | | | | | | | | # Conflicts: # Zend/zend_language_scanner.c # Zend/zend_language_scanner.l # ext/simplexml/tests/SimpleXMLElement_xpath.phpt
| * Fix typo in Unicode escape testAndrea Faulds2015-06-061-1/+1
| |
| * Show argument causing TypeException in traceNikita Popov2015-05-203-3/+3
| | | | | | | | Not sure why that check was there, did I miss something?
* | Update exception names in tests after formatting changes.Aaron Piotrowski2015-05-178-8/+8
| |
* | Merge branch 'master' into throwable-interfaceAaron Piotrowski2015-05-179-9/+22
|\ \ | |/
| * Display TypeExceptions like normal exceptionsNikita Popov2015-05-173-3/+16
| | | | | | | | | | | | | | We currently don't show the argument at which the error actually occured in the trace - should probably either add it or don't display args on incomplete frames altogether, otherwise this'll probably be confusing.
| * Tweak uncaught exception message displayNikita Popov2015-05-176-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | This implements a reduced variant of #1226 with just the following change: -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method foo::bar() from context ''' in %s:%d +Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d The '' wrapper around messages is very weird if the exception message itself contains ''. Futhermore having the message wrapped in '' doesn't work for the "and defined" suffix of TypeExceptions.
* | Updated tests to reflect exception class changes.Aaron Piotrowski2015-05-166-6/+6
|/
* Display EngineExceptions like ordinary exceptionsNikita Popov2015-05-155-5/+20
| | | | | | | | | TypeException stays as-is for now because it uses messages that are incompatible with the way exception messages are displayed. closure_038.phpt and a few others now show that we're generating too many exceptions for compound operations on undefined properties -- this needs to be fixed in a followup.
* 0.0 / 0.0 = NaNDmitry Stogov2015-04-061-9/+9
|
* Fixed weird operators behavior. Division by zero now emits warning and ↵Dmitry Stogov2015-04-069-404/+444
| | | | returns +/-INF, modulo by zero and intdid() throws an exception, shifts by negative offset throw exceptions. Compile-time evaluation of division by zero is disabled.
* Throw ParseException from lexerNikita Popov2015-04-027-7/+7
| | | | | | | Primarily to avoid getting fatal errors from token_get_all(). Implemented using a magic E_ERROR token, which the lexer emits to force a parser failure.
* Reclassify E_STRICT noticesNikita Popov2015-04-0113-26/+24
| | | | | | | Per RFC https://wiki.php.net/rfc/reclassify_e_strict While reviewing this, found that there are still three E_STRICTs left in libraries - need to discuss those.
* Finish PHP 4 constructor deprecationNikita Popov2015-03-311-1/+1
|
* Deprecate PHP 4 constructorsAndrea Faulds2015-03-319-11/+11
|
* Fixed error messagesDmitry Stogov2015-03-201-1/+1
|
* Fix executor issue with ignoring strict types, which cleans up a bunch of ↵Anthony Ferrara2015-03-181-1/+1
| | | | errors. Additionally fix the expected error of 2 unrelated tests that was caused by a change to the core error messages
* Errors converted to exceptions are not "recoverable" anymore.Dmitry Stogov2015-03-103-3/+3
|
* Implement engine exceptionsDmitry Stogov2015-03-091-14/+6
| | | | | | | RFC: https://wiki.php.net/rfc/engine_exceptions_for_php7 Pending changes regarding naming of BaseException and whether it should be an interface.
* Merge branch 'pull-request/1007'Stanislav Malyshev2015-02-181-0/+94
|\ | | | | | | | | | | * pull-request/1007: Fix associativity to match Perl Blast off to space.
| * Blast off to space.Andrea Faulds2015-01-291-0/+94
| |