mirror of https://gitee.com/bigwinds/arangodb
test for issue #2342
This commit is contained in:
parent
737698151d
commit
14d5898fc2
|
@ -3227,6 +3227,14 @@ const impTodos = [{
|
||||||
create: 'true',
|
create: 'true',
|
||||||
separator: ';',
|
separator: ';',
|
||||||
backslash: true
|
backslash: true
|
||||||
|
}, {
|
||||||
|
id: 'csvnoeol',
|
||||||
|
data: makePathUnix('js/common/test-data/import/import-noeol.csv'),
|
||||||
|
coll: 'UnitTestsImportCsvNoEol',
|
||||||
|
type: 'csv',
|
||||||
|
create: 'true',
|
||||||
|
separator: ',',
|
||||||
|
backslash: true
|
||||||
}, {
|
}, {
|
||||||
id: 'tsv1',
|
id: 'tsv1',
|
||||||
data: makePathUnix('js/common/test-data/import/import-1.tsv'),
|
data: makePathUnix('js/common/test-data/import/import-1.tsv'),
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
"value1","value2"
|
||||||
|
a,b
|
||||||
|
c,d
|
||||||
|
e,f
|
|
|
@ -42,6 +42,7 @@
|
||||||
db._drop("UnitTestsImportCsv3");
|
db._drop("UnitTestsImportCsv3");
|
||||||
db._drop("UnitTestsImportCsv4");
|
db._drop("UnitTestsImportCsv4");
|
||||||
db._drop("UnitTestsImportCsv5");
|
db._drop("UnitTestsImportCsv5");
|
||||||
|
db._drop("UnitTestsImportCsvNoEol");
|
||||||
db._drop("UnitTestsImportTsv1");
|
db._drop("UnitTestsImportTsv1");
|
||||||
db._drop("UnitTestsImportTsv2");
|
db._drop("UnitTestsImportTsv2");
|
||||||
db._drop("UnitTestsImportVertex");
|
db._drop("UnitTestsImportVertex");
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
db._drop("UnitTestsImportCsv3");
|
db._drop("UnitTestsImportCsv3");
|
||||||
db._drop("UnitTestsImportCsv4");
|
db._drop("UnitTestsImportCsv4");
|
||||||
db._drop("UnitTestsImportCsv5");
|
db._drop("UnitTestsImportCsv5");
|
||||||
|
db._drop("UnitTestsImportCsvNoEol");
|
||||||
db._drop("UnitTestsImportTsv1");
|
db._drop("UnitTestsImportTsv1");
|
||||||
db._drop("UnitTestsImportTsv2");
|
db._drop("UnitTestsImportTsv2");
|
||||||
db._drop("UnitTestsImportVertex");
|
db._drop("UnitTestsImportVertex");
|
||||||
|
|
|
@ -285,6 +285,21 @@ function importTestSuite () {
|
||||||
assertEqual(expected, actual);
|
assertEqual(expected, actual);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief test csv import without trailing eol
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
testCsvImportNoEol : function () {
|
||||||
|
var expected = [
|
||||||
|
{ value1: "a", value2: "b" },
|
||||||
|
{ value1: "c", value2: "d" },
|
||||||
|
{ value1: "e", value2: "f" }
|
||||||
|
];
|
||||||
|
|
||||||
|
var actual = getQueryResults("FOR i IN UnitTestsImportCsvNoEol SORT i.value1 RETURN i");
|
||||||
|
assertEqual(expected, actual);
|
||||||
|
},
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief test tsv import
|
/// @brief test tsv import
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in New Issue