[Lldb-commits] [PATCH] D52270: TestMultilineExpr: validate evaluation for expressions spread over multiple lines
Stefan Gränitz via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 19 10:48:30 PDT 2018
sgraenitz created this revision.
sgraenitz added reviewers: vsk, davide, aprantl.
When LLDB successfully parses a command (like "expression" in this case) and determines incomplete input, the user can continue typing on multiple lines (in this case "2+3"). This should provide the correct result.
Note that LLDB reverts input from the additional lines, so they are not present in the output.
https://reviews.llvm.org/D52270
Files:
lit/Expr/TestMultilineExpr.test
Index: lit/Expr/TestMultilineExpr.test
===================================================================
--- /dev/null
+++ lit/Expr/TestMultilineExpr.test
@@ -0,0 +1,10 @@
+# RUN: %lldb -b -s %s | FileCheck %s
+
+# In terminal sessions LLDB reverts input from subsequent lines so it doesn't show up in the output we check below.
+expression
+2+
+3
+
+# CHECK: (lldb) expression
+# CHECK-NEXT: Enter expressions, then terminate with an empty line to evaluate:
+# CHECK-NEXT: (int) {{.*}} = 5
\ No newline at end of file
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52270.166145.patch
Type: text/x-patch
Size: 521 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180919/0d29e9c5/attachment.bin>
More information about the lldb-commits
mailing list