File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / general_functions / bug49847.phpt
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 01:32:08 2013 UTC (11 years ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17, HEAD
5.4.17

--TEST--
Bug #49847 (exec() fails on lines larger then 4095 bytes)
--FILE--
<?php
$iswin =  substr(PHP_OS, 0, 3) == "WIN";

if ($iswin) {
	$f = dirname(__FILE__) . '\\bug49847.tmp';
	$s = str_repeat(' ', 4097);
	$s .= '1';
	file_put_contents($f, $s);
	exec('type ' . $f, $output);
} else {
	exec("printf %4098d 1", $output);
}
var_dump($output);
if ($iswin) {
	unlink($f);
}
?>
--EXPECTF--
array(1) {
  [0]=>
  string(4098) "%s 1"
}


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>