FlineDev / CSVImporter

Import CSV files line by line with ease
MIT License
148 stars 31 forks source link

Replace multiple instances of delimiterQuoteDelimiter #21

Closed chrisleversuch closed 6 years ago

chrisleversuch commented 7 years ago

I had an issue where I had 2 columns next to each other in a CSV that were empty strings. The first was processed fine but the 2nd ended up as a double quote character. This PR appears to fix the problem.

Example CSV line: "21 Feb 2017","DIRECT DEBIT PAYMENT","","","£104.30"

Jeehut commented 7 years ago

Sorry for getting back to so late. Unfortunately the Tests did not pass – I know, you can't see them (that's going to be fixed soon hopefully by the Bitrise CI) but here's the line that is not passing:

Tests/Code/CSVImporterSpec.swift:36:
expect(didFail).toEventually(beTrue(), timeout: 5)

Actually I think the test server was just too slow, feel free to bump the timeout up to 10 seconds. Also, please could you add a test with the strings (e.g. the example above) to ensure this feature doesn't get broken over time when further changes are made to the matching algorithm? Thanks!

Jeehut commented 6 years ago

Any action planned here? Needs to be rebased and tests and documentation is missing, too.

gaming-hacker commented 6 years ago

@Dschee i think your correct. have you tried testing on travis?

looks good, i'm going to pull this into my fork.

Jeehut commented 6 years ago

I just rebased this and posted a new PR in #40 which supersedes this.

@gaming-hacker I updated the Bitrise CI configuration and made the project public. Once the new PR passes tests, I'll merge.