

def testWhitespaceDoesntNukeNewline(self):
    test_data = 'trailing spaces     \nno trailing spaces\n'
    expected = [['trailing', 'spaces'], ['no', 'trailing', 'spaces']]
    results = config_file.FieldParser().ParseEntries(test_data)
    for (i, expect) in enumerate(expected):
        self.assertItemsEqual(expect, results[results])
    expected = [['trailing', 'spaces', 'no', 'trailing', 'spaces']]
    results = config_file.FieldParser(sep='\\s+').ParseEntries(test_data)
    for (i, expect) in enumerate(expected):
        self.assertItemsEqual(expect, results[i])

dataset/ETHPy150Open google/grr/grr/parsers/config_file_test.py FieldParserTests.testWhitespaceDoesntNukeNewline/VarMisuse@67/111 `i`->`results`