1cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chen"""
2cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny ChenTest that backticks without a target should work (not infinite looping).
3cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chen"""
4cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chen
5cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chenimport os, time
6cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chenimport unittest2
7cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chenimport lldb
8cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chenfrom lldbtest import *
9cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chen
10cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chenclass BackticksWithNoTargetTestCase(TestBase):
11cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chen
12cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chen    mydir = "functionalities/backticks"
13cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chen
14cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chen    def test_backticks_no_target(self):
15cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chen        """A simple test of backticks without a target."""
16cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chen        self.expect("print `1+2-3`",
17cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chen            substrs = [' = 0'])
18cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chen
19cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chenif __name__ == '__main__':
20cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chen    import atexit
21cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chen    lldb.SBDebugger.Initialize()
22cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chen    atexit.register(lambda: lldb.SBDebugger.Terminate())
23cf78037980a9345c12b1e2562bc4eda63cea95b3Johnny Chen    unittest2.main()
24