

def testClear(self):
    tplt = 'Value Required boo (on.)\nValue Filldown,Required hoo (tw.)\n\nStart\n  ^$boo -> Next.Record\n  ^$hoo -> Next.Clear'
    t = textfsm.TextFSM(cStringIO.StringIO(tplt))
    data = 'one\ntwo\nonE\ntwO'
    result = t.ParseText(data)
    self.failUnlessEqual(str(result), "[['onE', 'two']]")
    tplt = 'Value Filldown boo (on.)\nValue Filldown hoo (tw.)\n\nStart\n  ^$boo -> Next.Clearall\n  ^$hoo'
    t = textfsm.TextFSM(cStringIO.StringIO(t))
    data = 'one\ntwo'
    result = t.ParseText(data)
    self.failUnlessEqual(str(result), "[['', 'two']]")

dataset/ETHPy150Open google/textfsm/textfsm_test.py UnitTestFSM.testClear/VarMisuse@67/213 `tplt`->`t`