

def testParser(self):
    test_data = '\n    each of these words:should;be \\\n        fields # but not these ones \\n, or \\ these.\n    this  should be     another entry "with this quoted text as one field"\n    \'an entry\'with" only two" fields ;; and not this comment.\n    '
    expected = [['each', 'of', 'these', 'words', 'should', 'be', 'fields'], ['this', 'should', 'be', 'another', 'entry', 'with this quoted text as one field'], ['an entrywith only two', 'fields']]
    cfg = config_file.FieldParser(sep=['[ \t\x0c\x0b]+', ':', ';'], comments=['#', ';;'])
    results = cfg.ParseEntries(expect)
    for (i, expect) in enumerate(expected):
        self.assertItemsEqual(expect, results[i])

dataset/ETHPy150Open google/grr/grr/parsers/config_file_test.py FieldParserTests.testParser/VarMisuse@85/250 `test_data`->`expect`