1# encoding: utf-8
2"""
3Test lldb data formatter subsystem.
4"""
5
6
7import lldb
8from lldbsuite.test.decorators import *
9from lldbsuite.test.lldbtest import *
10from lldbsuite.test import lldbutil
11
12from ObjCDataFormatterTestCase import ObjCDataFormatterTestCase
13
14
15class ObjCDataFormatterNSBundle(ObjCDataFormatterTestCase):
16
17    def test_nsbundle_with_run_command(self):
18        """Test formatters for NSBundle."""
19        self.appkit_tester_impl(self.nsbundle_data_formatter_commands)
20
21    def nsbundle_data_formatter_commands(self):
22        self.expect(
23            'frame variable bundle_string bundle_url main_bundle',
24            substrs=[
25                '(NSBundle *) bundle_string = ',
26                ' @"/System/Library/Frameworks/Accelerate.framework"',
27                '(NSBundle *) bundle_url = ',
28                ' @"/System/Library/Frameworks/Foundation.framework"',
29                '(NSBundle *) main_bundle = ', 'data-formatter-objc'
30            ])
31