Use Python raw string literal to avoid escaping the escape sequence and to make

the command given to lldb command interpreter more readable.

llvm-svn: 121199
This commit is contained in:
Johnny Chen 2010-12-07 23:12:51 +00:00
parent f09c44c7ab
commit aa92f631b4
1 changed files with 7 additions and 7 deletions

View File

@ -91,33 +91,33 @@ class BasicExprCommandsTestCase(TestBase):
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')