

def testEnd(self):
    tplt = 'Value boo (.*)\n\nStart\n  ^$boo -> End\n  ^$boo -> Record\n'
    t = textfsm.TextFSM(cStringIO.StringIO(tplt))
    data = 'Matching text A\nMatching text B'
    result = t.ParseText(data)
    self.failUnlessEqual(str(result), '[]')
    tplt = 'Value boo (.*)\n\nStart\n  ^$boo -> Record End\n'
    t = textfsm.TextFSM(cStringIO.StringIO(tplt))
    result = t.ParseText(data)
    data.failUnlessEqual(str(result), "[['Matching text A']]")
    tplt = 'Value boo (.*)\n\nStart\n  ^$boo -> EOF\n  ^$boo -> Record\n'
    t = textfsm.TextFSM(cStringIO.StringIO(tplt))
    result = t.ParseText(data)
    self.failUnlessEqual(str(result), "[['Matching text A']]")

dataset/ETHPy150Open google/textfsm/textfsm_test.py UnitTestFSM.testEnd/VarMisuse@80/179 `self`->`data`