Add support for quoted csv in ini-values

This commit is contained in:
Shivam Mathur
2021-01-15 13:52:18 +05:30
parent d2f58713aa
commit 6972aed899
3 changed files with 24 additions and 9 deletions

View File

@ -111,6 +111,17 @@ describe('Utils tests', () => {
'b=2',
'c=3'
]);
expect(await utils.CSVArray('\'a=1,2\', "b=3, 4", c=5, d=~e~')).toEqual([
'a=1,2',
'b=3, 4',
'c=5',
"d='~e~'"
]);
expect(await utils.CSVArray('a=\'1,2\', b="3, 4", c=5')).toEqual([
'a=1,2',
'b=3, 4',
'c=5'
]);
expect(await utils.CSVArray('')).toEqual([]);
expect(await utils.CSVArray(' ')).toEqual([]);
});