mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 00:36:38 +00:00
$this->auto_non_chars didn't work the way I would have expected:
The "-" was taken literally, and thus 0 was forbidden, but 1 was allowed. Fixes #55. Also see #61
This commit is contained in:
@@ -52,6 +52,16 @@ class ParseTest extends PHPUnit\Framework\TestCase {
|
||||
$this->assertEquals($expected_data, $row);
|
||||
}
|
||||
|
||||
public function testAllNumericalCsv() {
|
||||
$this->csv->heading = false;
|
||||
$sInput = "86545235689\r\n34365587654\r\n13469874576";
|
||||
$this->assertEquals(false, $this->csv->auto($sInput));
|
||||
$this->assertEquals(null, $this->csv->delimiter);
|
||||
$expected_data = explode("\r\n", $sInput);
|
||||
$actual_data = array_map('reset', $this->csv->data);
|
||||
$this->assertEquals($expected_data, $actual_data);
|
||||
}
|
||||
|
||||
public function test_sep_row_auto_detection_UTF8() {
|
||||
$this->_autoparse_magazine_file(
|
||||
__DIR__ . '/../example_files/UTF-8_with_BOM_and_sep_row.csv');
|
||||
|
||||
Reference in New Issue
Block a user