~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Robert Collins
  • Date: 2007-07-03 02:33:32 UTC
  • mto: This revision was merged to the branch mainline in revision 2581.
  • Revision ID: robertc@robertcollins.net-20070703023332-jz0qdt2dwhzjuhlc
* ``bzrlib.add.smart_add`` and ``bzrlib.add.smart_add_tree`` are now
  deprecated in favour of ``MutableTree.smart_add``. (Robert Collins,
  Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
175
175
        self.assertEqual(base_tree.path2id('b/d'), new_tree.path2id('d'))
176
176
 
177
177
    def test_add_dry_run(self):
178
 
        # ensure that --dry-run actually don't add anything
179
 
        base_tree = self.make_branch_and_tree('.')
180
 
        self.build_tree(['spam'])
181
 
        out = self.run_bzr(['add', '--dry-run'], retcode=0)[0]
182
 
        self.assertEquals('added spam\n', out)
183
 
        out = self.run_bzr(['added'], retcode=0)[0]
184
 
        self.assertEquals('', out)
 
178
        """Test a dry run add, make sure nothing is added."""
 
179
        wt = self.make_branch_and_tree('.')
 
180
        self.build_tree(['inertiatic/', 'inertiatic/esp'])
 
181
        self.assertEqual(list(wt.unknowns()), ['inertiatic'])
 
182
        self.run_bzr('add --dry-run')
 
183
        self.assertEqual(list(wt.unknowns()), ['inertiatic'])
185
184
 
186
185
    def test_add_control_dir(self):
187
186
        """The control dir and its content should be refused."""