|
|
|
@ -343,6 +343,42 @@ var CORE_PARSER_TESTS = [
@@ -343,6 +343,42 @@ var CORE_PARSER_TESTS = [
|
|
|
|
|
data: [['a'], ['b'], [''], [''], ['c'], ['d'], ['e'], ['']], |
|
|
|
|
errors: [] |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
description: "Fast mode, basic", |
|
|
|
|
input: 'a,b,c\nd,e,f', |
|
|
|
|
config: { fastMode: true }, |
|
|
|
|
expected: { |
|
|
|
|
data: [['a', 'b', 'c'], ['d', 'e', 'f']], |
|
|
|
|
errors: [] |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
description: "Fast mode with comments", |
|
|
|
|
input: '// Commented line\na,b,c', |
|
|
|
|
config: { fastMode: true, comments: "//" }, |
|
|
|
|
expected: { |
|
|
|
|
data: [['a', 'b', 'c']], |
|
|
|
|
errors: [] |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
description: "Fast mode with preview", |
|
|
|
|
input: 'a,b,c\nd,e,f\nh,j,i\n', |
|
|
|
|
config: { fastMode: true, preview: 2 }, |
|
|
|
|
expected: { |
|
|
|
|
data: [['a', 'b', 'c'], ['d', 'e', 'f']], |
|
|
|
|
errors: [] |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
description: "Fast mode with blank line at end", |
|
|
|
|
input: 'a,b,c\n', |
|
|
|
|
config: { fastMode: true }, |
|
|
|
|
expected: { |
|
|
|
|
data: [['a', 'b', 'c'], ['']], |
|
|
|
|
errors: [] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|