Bug 803835 - Part 2: Regression tests for quoted fields in CSV files. r=mconley.

This commit is contained in:
Mark Banner 2012-11-02 13:34:20 -04:00
Родитель a922f4dbeb
Коммит 3a8f57ee3e
4 изменённых файлов: 24 добавлений и 0 удалений

Просмотреть файл

@ -67,6 +67,14 @@
"PrimaryEmail" : "名無しの権兵衛@host.invalid"
}
],
"quote_csv" :
[
{
"DisplayName" : "Acer America",
"Work Phone" : "(800) 000-0000",
"Organization" : "Acer America"
}
],
"vcard_import" :
[
{

Просмотреть файл

@ -0,0 +1,2 @@
First Name,Last Name,Display Name,Nickname,Primary Email,Secondary Email,Screen Name,Work Phone,Home Phone,Fax Number,Pager Number,Mobile Number,Home Address,Home Address 2,Home City,Home State,Home ZipCode,Home Country,Work Address,Work Address 2,Work City,Work State,Work ZipCode,Work Country,Job Title,Department,Organization,Web Page 1,Web Page 2,Birth Year,Birth Month,Birth Day,Custom 1,Custom 2,Custom 3,Custom 4,Notes
,,"Acer America",,,,,"(800) 000-0000","","","","","","","","","","","","","","","","",,,"Acer America",,,,,,,,,,
1 First Name Last Name Display Name Nickname Primary Email Secondary Email Screen Name Work Phone Home Phone Fax Number Pager Number Mobile Number Home Address Home Address 2 Home City Home State Home ZipCode Home Country Work Address Work Address 2 Work City Work State Work ZipCode Work Country Job Title Department Organization Web Page 1 Web Page 2 Birth Year Birth Month Birth Day Custom 1 Custom 2 Custom 3 Custom 4 Notes
2 Acer America (800) 000-0000 Acer America

Просмотреть файл

@ -0,0 +1,13 @@
/**
* Tests importing quoted csv address books.
*/
function run_test()
{
// Due to the import code using nsIAbManager off the main thread, we need
// to ensure that it is initialized before we start the main test.
let abMgr = MailServices.ab;
let file = do_get_file("resources/quote.csv");
new AbImportHelper(file, "csv", "quote",
"quote_csv").beginImport();
}

Просмотреть файл

@ -6,6 +6,7 @@ tail = tail_import.js
[test_bug_437556.js]
[test_csv_GetSample.js]
[test_csv_import.js]
[test_csv_import_quote.js]
[test_ldif_import.js]
[test_oe_settings.js]
run-if = os == 'win'