[Lldb-commits] [PATCH] Enhance lldb-mi arguments test (MI)

Dawn Perchik dawn+llvm at burble.org
Wed Jun 17 16:42:10 PDT 2015


Hi ki.stfu, abidh, brucem,

Add additional arguments to lldb-mi args test to make sure arguments with quotes are handled correctly.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D10523

Files:
  test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py

Index: test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
===================================================================
--- test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
+++ test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
@@ -61,8 +61,8 @@
         self.spawnLldbMi(args = None)
 
         # Test that "settings set target.run-args" passes arguments to executable
-        #FIXME: "--arg1 \"2nd arg\" third_arg fourth=\"4th arg\"" causes an error
-        self.runCmd("-interpreter-exec console \"setting set target.run-args arg1\"")
+        #FIXME: --arg1 causes an error
+        self.runCmd("-interpreter-exec console \"setting set target.run-args arg1 \\\"2nd arg\\\" third_arg fourth=\\\"4th arg\\\"\"")
         self.expect("\^done")
 
         # Load executable
@@ -74,7 +74,7 @@
         self.expect("\^running")
 
         # Test that arguments were passed properly
-        self.expect("@\"argc=2\\\\r\\\\n\"")
+        self.expect("@\"argc=5\\\\r\\\\n\"")
 
     @lldbmi_test
     @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
@@ -89,8 +89,8 @@
         self.expect("\^done")
 
         # Test that "settings set target.run-args" passes arguments to executable
-        #FIXME: "--arg1 \"2nd arg\" third_arg fourth=\"4th arg\"" causes an error
-        self.runCmd("-interpreter-exec console \"setting set target.run-args arg1\"")
+        #FIXME: --arg1 causes an error
+        self.runCmd("-interpreter-exec console \"setting set target.run-args arg1 \\\"2nd arg\\\" third_arg fourth=\\\"4th arg\\\"\"")
         self.expect("\^done")
 
         # Run
@@ -98,7 +98,7 @@
         self.expect("\^running")
 
         # Test that arguments were passed properly
-        self.expect("@\"argc=2\\\\r\\\\n\"")
+        self.expect("@\"argc=5\\\\r\\\\n\"")
 
     @lldbmi_test
     @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10523.27894.patch
Type: text/x-patch
Size: 1941 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150617/a95fe960/attachment.bin>


More information about the lldb-commits mailing list