1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Commit Graph

47 Commits

Author SHA1 Message Date
Kalle Sommer Nielsen f9959ee7c2 Change PHP_OS_FAMILY slightly
* PHP_OS_FAMILY is now a macro, to allow extensions to take advantage of it, it is defined in php.h
* Values are not upper-case-first, not always uppercase. Windows is no longer just "Win", if we want the short version for testing then PHP_OS is always WINNT anyway
2017-02-22 12:31:06 +01:00
Stricted bb059fe0a7 add PHP_OS_FAMILY constant to determine on which os we are 2017-01-25 20:50:14 +00:00
Nikita Popov 5af586bec5 Remove more PHP 6 leftovers from tests 2016-11-24 22:39:39 +01:00
Anatol Belski c482ee6020 Introduce SKIP_IO_CAPTURE_TESTS group
to workaround false positives with some CI systems
2016-11-06 00:04:53 +01:00
Michele Locati 33301d5bae Add VT100 support for Windows
Fix function names prefix

Use Unicode version of GetFinalPathNameByHandle

Use EG(windows_version_info) instead of RtlGetVersion

Use the specified handle_id instead of STD_OUTPUT_HANDLE

Switch from stream name to stream resource

Allow running tests capturing only stdout and/or stderr

Add tests for stream_vt100_support function

Export Win32 console functions

Fix x64 build

Use zend_long instead of long long, use GetConsole instead of GetFinalPathNameByHandleW to check if a handle is a valid console stream

Always use zend_long on any platform

Use _get_osfhandle to determine the standard handle

Accept stream names

Raise warnings in case of invalid stream parameter

Return true if disabling VT100 support on a not-console/redirected stream or on old Windows versions

Remove php_win32_console_os_supports_vt100

Differentiate stdin vs stdout/stderr

Simplify setting flag

Allow avoid piping STDIN

Let stream_vt100_support accept only resources

Fix run-tests

Revert console flags in case of failure

Simplify logic of stream_vt100_support when setting the flag

Return true if succeeded, false otherwise

Drop support for STDIN

More comprehensive tests for stream_vt100_support

Remove old tests

Fix name of included file and use absolute paths

Enable ENABLE_VIRTUAL_TERMINAL_PROCESSING on Windows by default

Remove tests for stream_vt100_support

Split stream_vt100_support into stream_isatty+sapi_windows_vt100_support

Add tests for stream_isatty

Add tests for sapi_windows_vt100_support

Return null from stream_isatty is neither Windows nor Posix

Fallback to S_ISCHR if neither Windows nor Posix

Avoid defining argc since it's only used once

Better comment about php_win32_console_fileno_is_console

Use events instead of cNumberOfEvents

Do not restore previous console mode

We need to restore previous console mode on failing SetConsole calls only for STDIN

Don't configure STDOUT/STDERR on Windows with PHP_CLI_WIN32_NO_CONSOLE
2016-10-28 19:23:00 +02:00
Nikita Popov 1b29e0cacd Switch zend_print_zval_r to use smart_str
Instead of directly writing to stdout. This allows doing a print_r
into a string, without using output buffering.

The motivation for this is bug #67467: print_r() in return mode
will still dump the string to stdout (causing a potential information
leak) if a fatal error occurs.
2016-06-13 18:04:22 +02:00
Xinchen Hui 0e91e5fb90 Fixed test 2015-11-26 12:00:25 +08:00
Xinchen Hui 4a7e83f54a Fixed bug #70970 (Segfault when combining error handler with output buffering)
of course we can try to refactor the current flow to make this error can
be catched safly.

but as 7.0.0 is releasing,  I don't think a refactor is safe now. and
actually I don't see any gain to make this catchable.

so let's keep this be consistent with 5.6 and safe for now
2015-11-25 08:00:20 -08:00
Dmitry Stogov ed9c8a23ba More accurate reference counting on closures 2015-03-10 23:04:41 +03:00
Reeze Xia 31d5b65c74 Fix test 2015-03-03 22:56:23 +08:00
Michael Wallner 6fed9960a9 fix test 2015-02-18 14:05:45 +01:00
Michael Wallner 84fad268d0 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix test
2015-02-18 14:05:10 +01:00
Michael Wallner 8b6919c77c fix test 2015-02-18 14:04:53 +01:00
Michael Wallner b36581aa75 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug #65593 (Segfault when calling ob_start from output buffering callback)
2015-02-18 14:04:19 +01:00
Michael Wallner 225af964c0 Fixed bug #65593 (Segfault when calling ob_start from output buffering callback) 2015-02-18 13:58:31 +01:00
Kalle Sommer Nielsen 334b9718d5 Fix tests I broke with the E_ERROR > E_RECOVERABLE_ERROR change 2014-12-29 07:54:44 +01:00
Andrea Faulds e5eb9530ab Use "float" and "integer" in typehint and zpp errors 2014-12-21 13:23:02 +00:00
Andrea Faulds ebaa42302a Skip buncha tests on 32-bit 2014-11-29 01:05:19 +00:00
Stanislav Malyshev e74776266f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix test for bug #60322
2013-06-13 10:30:18 -07:00
Stanislav Malyshev 10b9579395 fix test for bug #60322 2013-06-13 10:30:00 -07:00
Dmitry Stogov e9641141aa Made test compatible with O+ 2013-03-16 16:11:00 +04:00
Michael Wallner 575790e842 fix bug #61272 ob_start callback get passed empty string 2012-11-28 10:19:44 +01:00
Stanislav Malyshev e36a5a1197 fix test 2012-05-15 23:09:46 -07:00
Olivier DOUCET e613889d50 more verbose skip reason in test files with not so obvious extension requirements 2012-02-25 12:10:41 +00:00
Michael Wallner 6b31413b13 Fix bug #60768 Output buffer not discarded
in php_output_handler_op():
  * if appending to buffer succeeds, just return HANDLER_NO_DATA
    and do nothing else
  * if a zero sized string or true is returned from the handler
    function, reset the context as well as the handler's buffer
2012-01-16 17:51:35 +00:00
Stanislav Malyshev f863d486d1 fix test 2011-12-26 05:08:09 +00:00
Stanislav Malyshev 87b9f7bb3a fix bug #60322 (ob_get_clean() now raises an E_NOTICE if no buffers exist) 2011-12-26 05:01:46 +00:00
Pierrick Charron 8e2dcfd8b6 Fixed bug #60321 (ob_get_status(true) no longer returns an array when buffer is empty). 2011-11-18 00:16:58 +00:00
Lars Strojny c2ad166fd5 Reverting r319136 2011-11-17 09:24:15 +00:00
Lars Strojny 7d0fe66ebe Adjusting error messages 2011-11-14 00:26:37 +00:00
Xinchen Hui 9b091f8c34 add skipif 2011-11-13 14:31:30 +00:00
Xinchen Hui 89feaefce1 Fixed bug #60282 (Segfault when using ob_gzhandler() with open buffers) 2011-11-13 04:11:57 +00:00
Jani Taskinen 72ae65bc9d - CS and "de-facto" style of returning NULL for failing parse-params, sync partially with PHP_5_3 too (reordering part :) 2010-12-03 15:34:24 +00:00
Jani Taskinen 07535b7986 - Fix test 2010-12-03 15:30:54 +00:00
Jani Taskinen 41a1de45fe - Add test for the ob_start($foo); leak/crash bug 2010-12-03 15:29:53 +00:00
Felipe Pena 42a57f7656 - Fix tests 2010-06-16 02:14:32 +00:00
Michael Wallner 11d24c1593 * implement new output API, fixing some bugs and implementing some feature
requests--let's see what I can dig out of the bugtracker for NEWS--
  and while crossing the road:
   * implemented new zlib API
   * fixed up ext/tidy (what was "s&" in zend_parse_parameters() supposed to do?)

Thanks to Jani and Felipe for pioneering.
2010-05-31 10:29:43 +00:00
Jani Taskinen af49e58f51 - Reverted r296062 and r296065 2010-03-12 10:28:59 +00:00
Jani Taskinen 06f072cb5e MFH: Improved / fixed output buffering (Michael Wallner) 2010-03-11 10:24:29 +00:00
Jani Taskinen c4d350632b - Use correct revision 2009-11-28 00:47:42 +00:00
Jani Taskinen e8e213ca01 - No dots here 2009-11-28 00:35:56 +00:00
andy wharmby 1e119743a5 Backport ob test to php 5.2 and 53. 2009-06-18 21:03:00 +00:00
andy wharmby 3fd133bcf3 Backport ob test to php 5.2 and 53. 2009-06-14 16:47:11 +00:00
Sebastian Schürmann 7942cd2c3c - Initial commit 2009-04-25 11:33:26 +00:00
Hannes Magnusson d800809da4 This is apparently fixed 2009-04-06 13:16:05 +00:00
David Coallier 2e5f11b841 - Fixed bug #46897: ob_flush() should fail to flush unerasable buffers
- Added test for bug46897
- A memleak has been identified while fixing this bug but the changes
  made by this commit do not affect ob_get_clean where the memleak (which
  is fixed in HEAD with the new handler) resides.
- [DOC] New noticed is outputted in ob_flush when the buffer is unerasable
2009-02-13 11:48:17 +00:00
Robin Fernandes bd7f18ab4f Additional output buffering tests. 2008-12-18 15:20:07 +00:00