Browse Source

Remove non needed test cases

pull/523/head
Sergi Almacellas Abellana 7 years ago
parent
commit
0b3f29c353
  1. 61
      tests/test-cases.js

61
tests/test-cases.js

@ -340,35 +340,6 @@ var CORE_PARSER_TESTS = [ @@ -340,35 +340,6 @@ var CORE_PARSER_TESTS = [
data: [['a', 'b', 'c'], ['', 'e', 'f'], ['', 'h', 'i'], ['', 'k', 'l']],
errors: []
}
},
{
description: "Line ends with quoted field, first field of next line is empty, \\r\\n",
input: 'a,b,c\r\n,e,f\r\n,"h","i"\r\n,"k","l"',
config: {
newline: '\r\n',
},
expected: {
data: [['a', 'b', 'c'], ['', 'e', 'f'], ['', 'h', 'i'], ['', 'k', 'l']],
errors: []
}
},
{
description: "Line ends with quoted field (longer), \\r\\n",
input: 'Task_TaskID,Task_Description,Task_BudgetHours,Task_Reference,Project_ProjectCode,Project_Description,Customer_CustomerCode,Customer_Name\r\n,"",,"","","","ABCDE","ABCDE Consulting"\r\n,"",,"","","","FGHIJ","FGHIJ Limited (Pty)"\r\n,"",,"","","","KLUMN","KLUMN"\r\n,"",,"","","","OPQRS","OPQRS Ltd"\r\n,"",,"","","","TUVWX","TUVWX Pty Ltd"',
config: {
newline: '\r\n',
},
expected: {
data: [
['Task_TaskID','Task_Description','Task_BudgetHours','Task_Reference','Project_ProjectCode','Project_Description','Customer_CustomerCode','Customer_Name'],
['','','','','','','ABCDE','ABCDE Consulting'],
['','','','','','','FGHIJ','FGHIJ Limited (Pty)'],
['','','','','','','KLUMN','KLUMN'],
['','','','','','','OPQRS','OPQRS Ltd'],
['','','','','','','TUVWX','TUVWX Pty Ltd'],
],
errors: []
}
},
{
description: "Quoted field at end of row (but not at EOF) has quotes",
@ -690,22 +661,6 @@ var PARSE_TESTS = [ @@ -690,22 +661,6 @@ var PARSE_TESTS = [
errors: []
}
},
{
description: "Line ends with quoted field, first field of next line is empty \\r\\n",
input: 'a,b,"c"\r\nd,e,"f"\r\n,"h","i"\r\n,"k","l"',
config: {
header: true,
newline: '\r\n',
},
expected: {
data: [
{a: 'd', b: 'e', c: 'f'},
{a: '', b: 'h', c: 'i'},
{a: '', b: 'k', c: 'l'}
],
errors: []
}
},
{
description: "Mixed slash n and slash r should choose first as precident",
input: 'a,b,c\nd,e,f\rg,h,i\n',
@ -778,6 +733,22 @@ var PARSE_TESTS = [ @@ -778,6 +733,22 @@ var PARSE_TESTS = [
errors: []
}
},
{
description: "Line ends with quoted field, first field of next line is empty using headers",
input: 'a,b,"c"\r\nd,e,"f"\r\n,"h","i"\r\n,"k","l"',
config: {
header: true,
newline: '\r\n',
},
expected: {
data: [
{a: 'd', b: 'e', c: 'f'},
{a: '', b: 'h', c: 'i'},
{a: '', b: 'k', c: 'l'}
],
errors: []
}
},
{
description: "Tab delimiter",
input: 'a\tb\tc\r\nd\te\tf',

Loading…
Cancel
Save