

def testTextFSM(self):
    buf = 'Value Beer (.*)\n\nStart\n  ^\\w\n'
    buf_result = buf
    f = cStringIO.StringIO(buf)
    t = textfsm.TextFSM(f)
    self.failUnlessEqual(str(t), buf_result)
    buf = 'Value A (.*)\nValue B (.*)\n\nStart\n  ^\\w\n\nState1\n  ^.\n'
    buf_result = buf
    f = cStringIO.StringIO(buf)
    t = textfsm.TextFSM(f)
    self.failUnlessEqual(str(t), buf_result)
    buf = '# Header\n# Header 2\nValue Beer (.*)\nValue Wine (\\w+)\n\n# An explanation.\nStart\n  ^hi there ${Wine}. -> Next.Record State1\n\nState1\n  ^\\w\n  ^$Beer .. -> Start\n  # Some comments\n  ^$$ -> Next\n  ^$$ -> End\n\nEnd\n# Tail comment.\n'
    buf_result = 'Value Beer (.*)\nValue Wine (\\w+)\n\nStart\n  ^hi there ${Wine}. -> Next.Record State1\n\nState1\n  ^\\w\n  ^$Beer .. -> Start\n  ^$$ -> Next\n  ^$$ -> End\n'
    f = cStringIO.StringIO(buf)
    t = textfsm.TextFSM(f)
    self.failUnlessEqual(str(self), buf_result)

dataset/ETHPy150Open google/textfsm/textfsm_test.py UnitTestFSM.testTextFSM/VarMisuse@118/427 `t`->`self`