/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Richard Wilbur
  • Date: 2016-02-04 19:07:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6618.
  • Revision ID: richard.wilbur@gmail.com-20160204190728-p0zvfii6zase0fw7
Update COPYING.txt from the original http://www.gnu.org/licenses/gpl-2.0.txt  (Only differences were in whitespace.)  Thanks to Petr Stodulka for pointing out the discrepancy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
"""External tests of 'brz ls'"""
 
17
"""External tests of 'bzr ls'"""
18
18
 
19
 
from breezy import (
 
19
from bzrlib import (
20
20
    ignores,
21
21
    tests,
22
22
    )
23
 
from breezy.tests.matchers import ContainsNoVfsCalls
 
23
from bzrlib.tests.matchers import ContainsNoVfsCalls
24
24
 
25
25
 
26
26
class TestLS(tests.TestCaseWithTransport):
33
33
 
34
34
        self.wt = self.make_branch_and_tree('.')
35
35
        self.build_tree_contents([
36
 
                                 ('.bzrignore', b'*.pyo\n'),
37
 
                                 ('a', b'hello\n'),
 
36
                                 ('.bzrignore', '*.pyo\n'),
 
37
                                 ('a', 'hello\n'),
38
38
                                 ])
39
39
 
40
40
    def ls_equals(self, value, args=None, recursive=True, working_dir=None):
53
53
                           'ls --verbose --null')
54
54
 
55
55
    def test_ls_basic(self):
56
 
        """Test the abilities of 'brz ls'"""
 
56
        """Test the abilities of 'bzr ls'"""
57
57
        self.ls_equals('.bzrignore\na\n')
58
58
        self.ls_equals('.bzrignore\na\n', './')
59
59
        self.ls_equals('?        .bzrignore\n'
97
97
 
98
98
    def test_show_ids(self):
99
99
        self.build_tree(['subdir/'])
100
 
        self.wt.add(['a', 'subdir'], [b'a-id', b'subdir-id'])
 
100
        self.wt.add(['a', 'subdir'], ['a-id', 'subdir-id'])
101
101
        self.ls_equals(
102
102
            '.bzrignore                                         \n'
103
103
            'a                                                  a-id\n'
139
139
        """If a path is specified, files are listed with that prefix"""
140
140
        self.build_tree(['subdir/', 'subdir/b'])
141
141
        self.wt.add(['subdir', 'subdir/b'])
142
 
        self.ls_equals('subdir/b\n',
 
142
        self.ls_equals('subdir/b\n' ,
143
143
                       'subdir')
144
144
        self.ls_equals('../.bzrignore\n'
145
145
                       '../a\n'
146
146
                       '../subdir/\n'
147
 
                       '../subdir/b\n',
 
147
                       '../subdir/b\n' ,
148
148
                       '..', working_dir='subdir')
149
149
        self.ls_equals('../.bzrignore\0'
150
150
                       '../a\0'
151
151
                       '../subdir\0'
152
 
                       '../subdir/b\0',
 
152
                       '../subdir/b\0' ,
153
153
                       '.. --null', working_dir='subdir')
154
154
        self.ls_equals('?        ../.bzrignore\n'
155
155
                       '?        ../a\n'
156
156
                       'V        ../subdir/\n'
157
 
                       'V        ../subdir/b\n',
 
157
                       'V        ../subdir/b\n' ,
158
158
                       '.. --verbose', working_dir='subdir')
159
159
        self.run_bzr_error(['cannot specify both --from-root and PATH'],
160
160
                           'ls --from-root ..', working_dir='subdir')
247
247
    def test_simple_ls(self):
248
248
        self.setup_smart_server_with_call_log()
249
249
        t = self.make_branch_and_tree('branch')
250
 
        self.build_tree_contents([('branch/foo', b'thecontents')])
 
250
        self.build_tree_contents([('branch/foo', 'thecontents')])
251
251
        t.add("foo")
252
252
        t.commit("message")
253
253
        self.reset_smart_call_log()