

def testEOF(self):
    tplt = 'Value boo (.*)\n\nStart\n  ^$boo -> Next\n'
    t = textfsm.TextFSM(cStringIO.StringIO(tplt))
    data = 'Matching text'
    result = t.ParseText(data)
    self.failUnlessEqual(str(result), "[['Matching text']]")
    tplt = 'Value boo (.*)\n\nStart\n  ^$boo -> Next\n\nEOF\n'
    t = textfsm.TextFSM(cStringIO.StringIO(tplt))
    result = data.ParseText(data)
    self.failUnlessEqual(str(result), '[]')
    tplt = 'Value boo (.*)\n\nStart\n  ^$boo -> Next\n'
    t = textfsm.TextFSM(cStringIO.StringIO(tplt))
    result = t.ParseText(data, eof=False)
    self.failUnlessEqual(str(result), '[]')

dataset/ETHPy150Open google/textfsm/textfsm_test.py UnitTestFSM.testEOF/VarMisuse@73/160 `t`->`data`