~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-01-02 22:56:30 UTC
  • mfrom: (2215.3.1 ls)
  • Revision ID: pqm@pqm.ubuntu.com-20070102225630-e2bbb87a8d1151bf
Allow ls to take a PATH

Show diffs side-by-side

added added

removed removed

Lines of Context:
134
134
                       'subdir\n'
135
135
                       , '--from-root', '--non-recursive')
136
136
 
 
137
    def test_ls_path(self):
 
138
        """If a path is specified, files are listed with that prefix"""
 
139
        self.build_tree(['subdir/', 'subdir/b'])
 
140
        self.wt.add(['subdir', 'subdir/b'])
 
141
        self.ls_equals('subdir/b\n' ,
 
142
                       'subdir')
 
143
        os.chdir('subdir')
 
144
        self.ls_equals('../.bzrignore\n'
 
145
                       '../a\n'
 
146
                       '../subdir\n'
 
147
                       '../subdir/b\n' ,
 
148
                       '..')
 
149
        self.ls_equals('../.bzrignore\0'
 
150
                       '../a\0'
 
151
                       '../subdir\0'
 
152
                       '../subdir/b\0' ,
 
153
                       '..', '--null')
 
154
        self.ls_equals('?        ../.bzrignore\n'
 
155
                       '?        ../a\n'
 
156
                       'V        ../subdir/\n'
 
157
                       'V        ../subdir/b\n' ,
 
158
                       '..', '--verbose')
 
159
        self.run_bzr_error('cannot specify both --from-root and PATH', 'ls',
 
160
                           '--from-root', '..')
 
161
 
137
162
    def test_ls_revision(self):
138
163
        self.wt.add(['a'])
139
164
        self.wt.commit('add')