~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Shannon Weyrick
  • Date: 2011-08-19 21:01:49 UTC
  • mto: This revision was merged to the branch mainline in revision 6086.
  • Revision ID: weyrick@mozek.us-20110819210149-7q4qqungeb3im9pq
Make it explicit in docs that large file skips happen only in recursive mode. Add test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
243
243
    def test_add_skip_large_files(self):
244
244
        """Test skipping files larger than add.maximum_file_size"""
245
245
        tree = self.make_branch_and_tree('.')
246
 
        self.build_tree(['small.txt', 'big.txt'])
 
246
        self.build_tree(['small.txt', 'big.txt', 'big2.txt'])
247
247
        self.build_tree_contents([('small.txt', '0\n')])
248
248
        self.build_tree_contents([('big.txt', '01234567890123456789\n')])
 
249
        self.build_tree_contents([('big2.txt', '01234567890123456789\n')])
249
250
        tree.branch.get_config().set_user_option('add.maximum_file_size', 5)
250
251
        out = self.run_bzr('add')[0]
251
 
        # the ordering is not defined at the moment
252
252
        results = sorted(out.rstrip('\n').split('\n'))
253
253
        self.assertEquals(['adding small.txt'], 
254
254
                          results)
 
255
        # named items never skipped, even if over max
 
256
        out, err = self.run_bzr(["add", "big2.txt"])
 
257
        results = sorted(out.rstrip('\n').split('\n'))
 
258
        self.assertEquals(['adding big2.txt'], 
 
259
                          results)
 
260
        self.assertEquals(err, "")
255
261
        tree.branch.get_config().set_user_option('add.maximum_file_size', 30)
256
262
        out = self.run_bzr('add')[0]
257
263
        results = sorted(out.rstrip('\n').split('\n'))