def testParsingExtractionSync(self): """Tests that the parser correctly handles a synchronized file. A synchronized file is one that starts with a timestamp line. """ parser = bash_history.BashHistoryParser() storage_writer = self._ParseFile(['bash_history'], parser) self._TestEventsFromFile(storage_writer)
def testParsingExtractionDesync(self): """Tests that the parser correctly handles a desynchronized file. A desynchronized file is one with half an event at the top. That is, it starts with a command line instead of a timestamp. """ parser = bash_history.BashHistoryParser() storage_writer = self._ParseFile(['bash_history_desync'], parser) self._TestEventsFromFile(storage_writer)