~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merged John Meinel's integration

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
from tempfile import TemporaryFile
30
30
import codecs
31
31
 
32
 
from bzrlib.branch import Branch
33
32
from bzrlib.builtins import merge
34
33
from bzrlib.revisionspec import RevisionSpec
35
34
from bzrlib.status import show_status
172
171
                          ['unknown:\n',
173
172
                           '  dir2\n'
174
173
                           ])
 
174
 
 
175
 
 
176
class TestStatus(TestCaseInTempDir):
 
177
 
 
178
    def test_status(self):
 
179
        self.run_bzr("init")
 
180
        self.build_tree(['hello.txt'])
 
181
        result = self.run_bzr("status")[0]
 
182
        self.assert_("unknown:\n  hello.txt\n" in result, result)
 
183
        self.run_bzr("add", "hello.txt")
 
184
        result = self.run_bzr("status")[0]
 
185
        self.assert_("added:\n  hello.txt\n" in result, result)
 
186
        self.run_bzr("commit", "-m", "added")
 
187
        result = self.run_bzr("status", "-r", "0..1")[0]
 
188
        self.assert_("added:\n  hello.txt\n" in result, result)
 
189
        self.build_tree(['world.txt'])
 
190
        result = self.run_bzr("status", "-r", "0")[0]
 
191
        self.assert_("added:\n  hello.txt\n" \
 
192
                     "unknown:\n  world.txt\n" in result, result)
 
193
 
 
194
        result2 = self.run_bzr("status", "-r", "0..")[0]
 
195
        self.assertEquals(result2, result)
 
196
 
 
197