|
|
@ -1324,7 +1324,7 @@ var PARSE_TESTS = [ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
description: "Using reserved regex characters as quote characters", |
|
|
|
description: "Using reserved regex character . as quote character", |
|
|
|
input: '.a\na.,b\r\nc,d\r\ne,f\r\ng,h\r\ni,j', |
|
|
|
input: '.a\na.,b\r\nc,d\r\ne,f\r\ng,h\r\ni,j', |
|
|
|
config: { quoteChar: '.' }, |
|
|
|
config: { quoteChar: '.' }, |
|
|
|
expected: { |
|
|
|
expected: { |
|
|
@ -1339,6 +1339,22 @@ var PARSE_TESTS = [ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
description: "Using reserved regex character | as quote character", |
|
|
|
|
|
|
|
input: '|a\na|,b\r\nc,d\r\ne,f\r\ng,h\r\ni,j', |
|
|
|
|
|
|
|
config: { quoteChar: '|' }, |
|
|
|
|
|
|
|
expected: { |
|
|
|
|
|
|
|
data: [['a\na', 'b'], ['c', 'd'], ['e', 'f'], ['g', 'h'], ['i', 'j']], |
|
|
|
|
|
|
|
errors: [], |
|
|
|
|
|
|
|
meta: { |
|
|
|
|
|
|
|
linebreak: '\r\n', |
|
|
|
|
|
|
|
delimiter: ',', |
|
|
|
|
|
|
|
cursor: 27, |
|
|
|
|
|
|
|
aborted: false, |
|
|
|
|
|
|
|
truncated: false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
description: "Parsing with skipEmptyLines set to 'greedy'", |
|
|
|
description: "Parsing with skipEmptyLines set to 'greedy'", |
|
|
|
notes: "Must parse correctly without lines with no content", |
|
|
|
notes: "Must parse correctly without lines with no content", |
|
|
|