File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / general_functions / bug49847.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:04 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_17p0, v5_3_10, HEAD
php

--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('more ' . $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>