]> granicus.if.org Git - php/commitdiff
New test
authorFelipe Pena <felipe@php.net>
Sun, 10 Feb 2008 03:55:39 +0000 (03:55 +0000)
committerFelipe Pena <felipe@php.net>
Sun, 10 Feb 2008 03:55:39 +0000 (03:55 +0000)
ext/standard/tests/file/bug42229.phpt [new file with mode: 0644]

diff --git a/ext/standard/tests/file/bug42229.phpt b/ext/standard/tests/file/bug42229.phpt
new file mode 100644 (file)
index 0000000..1603dea
--- /dev/null
@@ -0,0 +1,26 @@
+--TEST--
+Bug #42229 (fgetcsv() behaves differently for a file containing '\n' with php5 and php6)
+--FILE--
+<?php
+
+$file = dirname(__FILE__) .'/filetest.tmp';
+$csv_string = '\n';
+
+$fp = fopen($file, "w+t");
+fwrite($fp, $csv_string);
+rewind($fp);
+var_dump(fgetcsv($fp));
+fclose($fp);
+unlink($file);
+
+?>
+--EXPECT--
+array(1) {
+  [0]=>
+  string(2) "\n"
+}
+--UEXPECT--
+array(1) {
+  [0]=>
+  unicode(2) "\n"
+}