~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Packman
  • Date: 2011-12-12 13:25:39 UTC
  • mto: This revision was merged to the branch mainline in revision 6360.
  • Revision ID: martin.packman@canonical.com-20111212132539-q8qkhwbptesaggus
Add failing tests for mkdir -p with existing directories

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    def test_mkdir(self):
28
28
        tree = self.make_branch_and_tree('.')
29
29
        self.run_bzr(['mkdir', 'somedir'])
30
 
 
31
30
        self.assertEquals(tree.kind(tree.path2id('somedir')), "directory")
32
31
 
33
32
    def test_mkdir_multi(self):
41
40
        self.run_bzr(['mkdir', '-p', 'somedir/foo'])
42
41
        self.assertEquals(tree.kind(tree.path2id('somedir/foo')), "directory")
43
42
 
 
43
    def test_mkdir_parents_existing_versioned_dir(self):
 
44
        tree = self.make_branch_and_tree('.')
 
45
        tree.mkdir('somedir')
 
46
        self.assertEquals(tree.kind(tree.path2id('somedir')), "directory")
 
47
        self.run_bzr(['mkdir', '-p', 'somedir'])
 
48
 
 
49
    def test_mkdir_parents_existing_unversioned_dir(self):
 
50
        tree = self.make_branch_and_tree('.')
 
51
        os.mkdir('somedir')
 
52
        self.run_bzr(['mkdir', '-p', 'somedir'])
 
53
        self.assertEquals(tree.kind(tree.path2id('somedir')), "directory")
 
54
 
44
55
    def test_mkdir_parents_with_unversioned_parent(self):
45
56
        tree = self.make_branch_and_tree('.')
46
57
        os.mkdir('somedir')