~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Test every option for "bzr missing"

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
        lines = self.capture('missing ../b', retcode=1).splitlines()
40
40
        self.assertEqual("You have 1 extra revision(s):", lines[0])
41
41
        self.assertEqual(8, len(lines))
 
42
        lines2 = self.capture('missing ../b --mine-only', retcode=1)
 
43
        lines2 = lines2.splitlines()
 
44
        self.assertEqual(lines, lines2)
 
45
        lines3 = self.capture('missing ../b --theirs-only', retcode=1)
 
46
        lines3 = lines3.splitlines()
 
47
        self.assertEqual(0, len(lines3))
42
48
 
43
49
        # relative to a, missing the 'merge' commit 
44
50
        os.chdir('../b')
45
51
        lines = self.capture('missing ../a', retcode=1).splitlines()
46
52
        self.assertEqual(missing, lines[0])
47
53
        self.assertEqual(8, len(lines))
 
54
        lines2 = self.capture('missing ../a --theirs-only', retcode=1)
 
55
        lines2 = lines2.splitlines()
 
56
        self.assertEqual(lines, lines2)
 
57
        lines3 = self.capture('missing ../a --mine-only', retcode=1)
 
58
        lines3 = lines3.splitlines()
 
59
        self.assertEqual(0, len(lines3))
 
60
        lines4 = self.capture('missing ../a --short', retcode=1)
 
61
        lines4 = lines4.splitlines()
 
62
        self.assertEqual(4, len(lines4))
 
63
        lines5 = self.capture('missing ../a --line', retcode=1)
 
64
        lines5 = lines5.splitlines()
 
65
        self.assertEqual(2, len(lines5))
 
66
        lines6 = self.capture('missing ../a --reverse', retcode=1)
 
67
        lines6 = lines6.splitlines()
 
68
        self.assertEqual(lines6, lines)
 
69
        lines7 = self.capture('missing ../a --show-ids', retcode=1)
 
70
        lines7 = lines7.splitlines()
 
71
        self.assertEqual(11, len(lines7))
 
72
        lines8 = self.capture('missing ../a --verbose', retcode=1)
 
73
        lines8 = lines8.splitlines()
 
74
        self.assertEqual("modified:", lines8[-2])
 
75
        self.assertEqual("  a", lines8[-1])
 
76
 
48
77
        
49
78
        # after a pull we're back on track
50
79
        self.capture('pull')