Skip to content

Instantly share code, notes, and snippets.

@pkoppstein
Last active December 26, 2018 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pkoppstein/a5364d07dc52d99163d6390df6375fd1 to your computer and use it in GitHub Desktop.
Save pkoppstein/a5364d07dc52d99163d6390df6375fd1 to your computer and use it in GitHub Desktop.
A CSV file for validating a CSV parser - q.v. https://gist.github.com/pkoppstein/e962076c25e75af201e958bdff92fdbf
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 3.
1
"2"
"3"
"4"
"5", "a"
"""6"""
"""7""","a"
8,b,c
9,"",c
10,,c
11,,
12,"b c","bSPACEc"
13,"C1","C2","C3","C4","C5"
14,"","""",blank-comma-quote
15," ",two-spaces
"16"," ","single space followed by embedded,commas"
17, "split
this
line","And
this
too"
18,"next record has both embedded newline and dquote"
"a
""b""","c"
19,"esctab","\t",a
20,"embedded tab"," ",d
21,"foo\\nbar"
22,"b,c\
d"
100,""this line is invalid and should result in an error condition and/or STDERR message"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment