e84818e9a7012323a5500d1734ecb6655b1a69ab
[openbsd] /
1 # encoding: utf-8
2 """
3 Test lldb data formatter subsystem.
4 """
5
6
7 import lldb
8 from lldbsuite.test.decorators import *
9 from lldbsuite.test.lldbtest import *
10 from lldbsuite.test import lldbutil
11
12 from ObjCDataFormatterTestCase import ObjCDataFormatterTestCase
13
14
15 class ObjCDataFormatterNSURL(ObjCDataFormatterTestCase):
16
17     @skipUnlessDarwin
18     def test_nsurl_with_run_command(self):
19         """Test formatters for NSURL."""
20         self.appkit_tester_impl(self.nsurl_data_formatter_commands)
21
22     def nsurl_data_formatter_commands(self):
23         self.expect(
24             'frame variable cfurl_ref cfchildurl_ref cfgchildurl_ref',
25             substrs=[
26                 '(CFURLRef) cfurl_ref = ', '@"http://www.foo.bar',
27                 'cfchildurl_ref = ', '@"page.html -- http://www.foo.bar',
28                 '(CFURLRef) cfgchildurl_ref = ',
29                 '@"?whatever -- http://www.foo.bar/page.html"'
30             ])
31
32         self.expect(
33             'frame variable nsurl nsurl2 nsurl3',
34             substrs=[
35                 '(NSURL *) nsurl = ', '@"http://www.foo.bar',
36                 '(NSURL *) nsurl2 =', '@"page.html -- http://www.foo.bar',
37                 '(NSURL *) nsurl3 = ',
38                 '@"?whatever -- http://www.foo.bar/page.html"'
39             ])