summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/expression_command
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command')
-rw-r--r--lldb/packages/Python/lldbsuite/test/expression_command/calculator_mode/TestCalculatorMode.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/calculator_mode/TestCalculatorMode.py b/lldb/packages/Python/lldbsuite/test/expression_command/calculator_mode/TestCalculatorMode.py
new file mode 100644
index 00000000000..46ea111bf03
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/expression_command/calculator_mode/TestCalculatorMode.py
@@ -0,0 +1,27 @@
+"""
+Test calling an expression without a target.
+"""
+
+from __future__ import print_function
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestCalculatorMode(TestBase):
+
+ mydir = TestBase.compute_mydir(__file__)
+
+ def setUp(self):
+ # Call super's setUp().
+ TestBase.setUp(self)
+
+ def test__calculator_mode(self):
+ """Test calling expressions in the dummy target."""
+ self.expect("expression 11 + 22", "11 + 22 didn't get the expected result", substrs=["33"])
+ # Now try it with a specific language:
+ self.expect("expression -l c -- 11 + 22", "11 + 22 didn't get the expected result", substrs=["33"])
+
OpenPOWER on IntegriCloud