svn: /pear/packages/File/trunk/ File/CSV.php tests/CSV/005.phpt

From: Date: Fri, 06 Apr 2012 05:00:52 +0000
Subject: svn: /pear/packages/File/trunk/ File/CSV.php tests/CSV/005.phpt
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-64639@lists.php.net to get a copy of this message
clockwerx Fri, 06 Apr 2012 05:00:52 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=324886 Log: Fix test expectations, as line break chars and strpos don't play well together for some reason Changed paths: U pear/packages/File/trunk/File/CSV.php U pear/packages/File/trunk/tests/CSV/005.phpt Modified: pear/packages/File/trunk/File/CSV.php =================================================================== --- pear/packages/File/trunk/File/CSV.php 2012-04-06 03:27:54 UTC (rev 324885) +++ pear/packages/File/trunk/File/CSV.php 2012-04-06 05:00:52 UTC (rev 324886) @@ -741,4 +741,4 @@ return true; } -} \ No newline at end of file +} Modified: pear/packages/File/trunk/tests/CSV/005.phpt =================================================================== --- pear/packages/File/trunk/tests/CSV/005.phpt 2012-04-06 03:27:54 UTC (rev 324885) +++ pear/packages/File/trunk/tests/CSV/005.phpt 2012-04-06 05:00:52 UTC (rev 324886) @@ -23,25 +23,6 @@ $data[] = $res; } -function _dbgBuff($data) -{ - foreach ($data as $key => $row) { - if (strpos($row, "\r") !== false) { - $row = str_replace("\r", "_r_", $row); - } - if (strpos($row, "\n") !== false) { - $str = str_replace("\n", "_n_", $row); - } - if (strpos($row, "\t") !== false) { - $row = str_replace("\t", "_t_", $row); - } - $data[$key] = $row; - } - return $data; -} - -$data = array_map('_dbgBuff', $data); - print "Data:\n"; print_r($data); ?> @@ -70,7 +51,8 @@ [0] => Field 2-1 [1] => Field 2-2 [2] => Field 2-3 - [3] => I'm multiline_r_Field + [3] => I'm multiline +Field ) [2] => Array

« previous php.pear.cvs (#64639) next »