~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testlog.py

  • Committer: Martin Pool
  • Date: 2005-09-22 13:32:02 UTC
  • Revision ID: mbp@sourcefrog.net-20050922133202-347cfd35d2941dd5
- simple weave-based annotate code (not complete)

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
            self.assertEquals(expected, got)
66
66
 
67
67
    def test_cur_revno(self):
68
 
        b = Branch.initialize('.')
 
68
        b = Branch('.', init=True)
69
69
 
70
70
        lf = LogCatcher()
71
71
        b.commit('empty commit')
86
86
    def test_simple_log(self):
87
87
        eq = self.assertEquals
88
88
        
89
 
        b = Branch.initialize('.')
 
89
        b = Branch('.', init=True)
90
90
 
91
91
        lf = LogCatcher()
92
92
        show_log(b, lf)
132
132
        self.log('log 2 delta: %r' % d)
133
133
        # self.checkDelta(d, added=['hello'])
134
134
        
135
 
        # commit a log message with control characters
136
 
        msg = "All 8-bit chars: " +  ''.join([unichr(x) for x in range(256)])
137
 
        b.commit(msg)
138
 
        lf = LogCatcher()
139
 
        show_log(b, lf, verbose=True)
140
 
        committed_msg = lf.logs[0].rev.message
141
 
        self.log("escaped commit message: %r", committed_msg)
142
 
        self.assert_(msg != committed_msg)
143
 
        self.assert_(len(committed_msg) > len(msg))