summaryrefslogtreecommitdiff
path: root/ext/standard/tests
diff options
context:
space:
mode:
authorHartmut Holzgraefe <hholzgra@php.net>2000-12-14 14:18:36 +0000
committerHartmut Holzgraefe <hholzgra@php.net>2000-12-14 14:18:36 +0000
commit9b1b25354813cc981497388714158e2246a021dd (patch)
treeb6d3cc1a3a949f99679f44e395e3cdef05e31aa9 /ext/standard/tests
parent9967b2e1491df3b02ae5b480ca33ab6d4e1df358 (diff)
downloadphp-git-9b1b25354813cc981497388714158e2246a021dd.tar.gz
fgetcsv() will now work correct with empty fields in tab delimited files
# fix for bug #8258 and regression test
Diffstat (limited to 'ext/standard/tests')
-rw-r--r--ext/standard/tests/general_functions/004.data4
-rw-r--r--ext/standard/tests/general_functions/004.phpt17
2 files changed, 21 insertions, 0 deletions
diff --git a/ext/standard/tests/general_functions/004.data b/ext/standard/tests/general_functions/004.data
new file mode 100644
index 0000000000..5dd0832842
--- /dev/null
+++ b/ext/standard/tests/general_functions/004.data
@@ -0,0 +1,4 @@
+name value comment
+true 1 boolean true
+false 0 boolean false
+empty nothing
diff --git a/ext/standard/tests/general_functions/004.phpt b/ext/standard/tests/general_functions/004.phpt
new file mode 100644
index 0000000000..0566502ab5
--- /dev/null
+++ b/ext/standard/tests/general_functions/004.phpt
@@ -0,0 +1,17 @@
+--TEST--
+fgetcsv() with tab delimited fields (BUG #8258)
+--POST--
+--GET--
+--FILE--
+<?php
+$fp=fopen("004.data","r");
+while($a=fgetcsv($fp,100,"\t")) {
+ echo join(",",$a)."\n";
+}
+fclose($fp);
+?>
+--EXPECT--
+name,value,comment
+true,1,boolean true
+false,0,boolean false
+empty,,nothing