~bzr/bzr-grep/ppa-daily

« back to all changes in this revision

Viewing changes to test_grep.py

  • Committer: Parth Malwankar
  • Date: 2010-03-14 04:29:07 UTC
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: parth.malwankar@gmail.com-20100314042907-e8nrua08avhaxtce
updated test to ensure that unknown files are skipped by default.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
        wd = 'foobar0'
66
66
        self.make_branch_and_tree(wd)
67
67
        os.chdir(wd)
68
 
        self._mk_versioned_file('filex.txt') # force rev to revno:1 and not revno:0
69
68
        self._mk_unknown_file('file0.txt')
 
69
 
70
70
        out, err = self.run_bzr(['grep', 'line1', 'file0.txt'])
71
71
        self.assertTrue(self._str_contains(out, "file0.txt:line1"))
72
72
 
 
73
        out, err = self.run_bzr(['grep', 'line1'])
 
74
        self.assertFalse(self._str_contains(out, "file0.txt"))
 
75
 
73
76
    def test_versioned_basic_file(self):
74
77
        """(versioned) Search for pattern in specfic file.
75
78
        """