~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2006-10-31 19:34:44 UTC
  • mfrom: (2063.5.5 ignore-branch)
  • mto: This revision was merged to the branch mainline in revision 2105.
  • Revision ID: john@arbash-meinel.com-20061031193444-5625664a35654df5
(Cheuksan Edward Wang) Fix bug #29488, allow 'bzr ignore' to take multiple paths

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
        self.assertEquals(self.capture('unknowns'), 'foo.blah\n')
68
68
        self.runbzr('ignore *.blah')
69
69
        self.assertEquals(self.capture('unknowns'), '')
70
 
        self.assertEquals('*.blah\n', open('.bzrignore', 'rU').read())
 
70
        self.check_file_contents('.bzrignore', '*.blah\n')
71
71
 
72
72
        # 'ignore' works when then .bzrignore file already exists
73
73
        file('garh', 'wt').write('garh')
74
74
        self.assertEquals(self.capture('unknowns'), 'garh\n')
75
75
        self.runbzr('ignore garh')
76
76
        self.assertEquals(self.capture('unknowns'), '')
77
 
        self.assertEquals(file('.bzrignore', 'rU').read(), '*.blah\ngarh\n')
 
77
        self.check_file_contents('.bzrignore', '*.blah\ngarh\n')
 
78
       
 
79
    def test_ignore_multiple_arguments(self): 
 
80
        """'ignore' works with multiple arguments"""
 
81
        self.runbzr('init')
 
82
        self.build_tree(['a','b','c','d'])
 
83
        self.assertEquals(self.capture('unknowns'), 'a\nb\nc\nd\n')
 
84
        self.runbzr('ignore a b c')
 
85
        self.assertEquals(self.capture('unknowns'), 'd\n')
 
86
        self.check_file_contents('.bzrignore', 'a\nb\nc\n')
78
87
        
79
88
    def test_ignore_old_defaults(self):
80
89
        out, err = self.run_bzr('ignore', '--old-default-rules')