~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_config.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-11-18 20:45:40 UTC
  • mfrom: (5533.2.5 672382-list-values)
  • Revision ID: pqm@pqm.ubuntu.com-20101118204540-un6e3t40melfjp9v
(vila) ``bzr config`` properly displays list values (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
        super(TestConfigDisplay, self).setUp()
75
75
        _t_config.create_configs(self)
76
76
 
 
77
    def test_multiline_all_values(self):
 
78
        self.bazaar_config.set_user_option('multiline', '1\n2\n')
 
79
        script.run_script(self, """\
 
80
            $ bzr config -d tree
 
81
            bazaar:
 
82
              multiline = '''1
 
83
            2
 
84
            '''
 
85
            """)
 
86
 
 
87
    def test_multiline_value_only(self):
 
88
        self.bazaar_config.set_user_option('multiline', '1\n2\n')
 
89
        script.run_script(self, """\
 
90
            $ bzr config -d tree multiline
 
91
            '''1
 
92
            2
 
93
            '''
 
94
            """)
 
95
 
 
96
    def test_list_all_values(self):
 
97
        self.bazaar_config.set_user_option('list', [1, 'a', 'with, a comma'])
 
98
        script.run_script(self, '''\
 
99
            $ bzr config -d tree
 
100
            bazaar:
 
101
              list = 1, a, "with, a comma"
 
102
            ''')
 
103
 
 
104
    def test_list_value_only(self):
 
105
        self.bazaar_config.set_user_option('list', [1, 'a', 'with, a comma'])
 
106
        script.run_script(self, '''\
 
107
            $ bzr config -d tree list
 
108
            1, a, "with, a comma"
 
109
            ''')
 
110
 
77
111
    def test_bazaar_config(self):
78
112
        self.bazaar_config.set_user_option('hello', 'world')
79
113
        script.run_script(self, '''\