Tests: Improve coverage for File::get_csv_line()

Adds a few more complex edge cases which are supported.

Also adds some documentation, simplifies the code a bit and forbids using
double quotes as a delimiter.
This commit is contained in:
Rémi Verschelde
2021-08-04 11:20:36 +02:00
parent 7eedc2c348
commit b8c08ba5ad
4 changed files with 57 additions and 25 deletions

View File

@@ -1,3 +1,8 @@
keys,en,de
GOOD_MORNING,"Good Morning","Guten Morgen"
GOOD_EVENING,"Good Evening",""
Without quotes,"With, comma","With ""inner"" quotes","With ""inner"", quotes"","" and comma","With ""inner
split"" quotes and
line breaks","With \nnewline chars"
Some other~delimiter~should still work, shouldn't it?
What about tab separated lines, good?
1 keys en de
2 GOOD_MORNING Good Morning Guten Morgen
3 GOOD_EVENING Good Evening
4 Without quotes With, comma With "inner" quotes
5 Some other~delimiter~should still work shouldn't it?
6 What about tab separated lines good?
7
8