[Lldb-commits] [lldb] r121199 - /lldb/trunk/test/expression_command/test/TestExprs.py

Johnny Chen johnny.chen at apple.com
Tue Dec 7 15:12:51 PST 2010


Author: johnny
Date: Tue Dec  7 17:12:51 2010
New Revision: 121199

URL: http://llvm.org/viewvc/llvm-project?rev=121199&view=rev
Log:
Use Python raw string literal to avoid escaping the escape sequence and to make
the command given to lldb command interpreter more readable.

Modified:
    lldb/trunk/test/expression_command/test/TestExprs.py

Modified: lldb/trunk/test/expression_command/test/TestExprs.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/test/TestExprs.py?rev=121199&r1=121198&r2=121199&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/test/TestExprs.py (original)
+++ lldb/trunk/test/expression_command/test/TestExprs.py Tue Dec  7 17:12:51 2010
@@ -91,33 +91,33 @@
             substrs = ['(char) $',
                        "'a'"])
 
-        # runCmd: expression printf ("\n\n\tHello there!\\n")
+        # runCmd: expression printf ("\n\n\tHello there!\n")
         # output: (unsigned long) $1 = 16
-        self.expect('expression printf ("\\n\\n\\tHello there!\\n")',
+        self.expect(r'''expression printf ("\n\n\tHello there!\n")''',
             substrs = ['(unsigned long) $',
                        '16'])
 
         # runCmd: expression printf("\t\x68\n")
         # output: (unsigned long) $2 = 3
-        self.expect('expression printf("\\t\\x68\\n")',
+        self.expect(r'''expression printf("\t\x68\n")''',
             substrs = ['(unsigned long) $',
                        '3'])
 
         # runCmd: expression printf("\"\n")
         # output: (unsigned long) $3 = 2
-        self.expect('expression printf("\\"\\n")',
+        self.expect(r'''expression printf("\"\n")''',
             substrs = ['(unsigned long) $',
                        '2'])
 
         # runCmd: expression printf("'\n")
         # output: (unsigned long) $4 = 2
-        self.expect('expression printf("\'\\n")',
+        self.expect(r'''expression printf("'\n")''',
             substrs = ['(unsigned long) $',
                        '2'])
 
-        # runCmd: command alias print_hi expression printf ("\n\tHi!")
+        # runCmd: command alias print_hi expression printf ("\n\tHi!\n")
         # output: 
-        self.runCmd('command alias print_hi expression printf ("\\n\\tHi!")')
+        self.runCmd(r'''command alias print_hi expression printf ("\n\tHi!\n")''')
         # This fails currently.
         self.runCmd('print_hi')
 





More information about the lldb-commits mailing list