~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Aaron Bentley
  • Date: 2007-08-21 01:32:29 UTC
  • mfrom: (2727 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2736.
  • Revision ID: aaron.bentley@utoronto.ca-20070821013229-miopsemz249tv0bl
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
296
296
class TestStatus(TestCaseWithTransport):
297
297
 
298
298
    def test_status_plain(self):
299
 
        self.run_bzr("init")
 
299
        tree = self.make_branch_and_tree('.')
300
300
 
301
301
        self.build_tree(['hello.txt'])
302
302
        result = self.run_bzr("status")[0]
303
303
        self.assertContainsRe(result, "unknown:\n  hello.txt\n")
304
304
 
305
 
        self.run_bzr("add hello.txt")
 
305
        tree.add("hello.txt")
306
306
        result = self.run_bzr("status")[0]
307
307
        self.assertContainsRe(result, "added:\n  hello.txt\n")
308
308
 
309
 
        self.run_bzr("commit -m added")
 
309
        tree.commit(message="added")
310
310
        result = self.run_bzr("status -r 0..1")[0]
311
311
        self.assertContainsRe(result, "added:\n  hello.txt\n")
312
312
 
318
318
        self.assertEquals(result2, result)
319
319
 
320
320
    def test_status_short(self):
321
 
        self.run_bzr("init")
 
321
        tree = self.make_branch_and_tree('.')
322
322
 
323
323
        self.build_tree(['hello.txt'])
324
324
        result = self.run_bzr("status --short")[0]
325
325
        self.assertContainsRe(result, "[?]   hello.txt\n")
326
326
 
327
 
        self.run_bzr("add hello.txt")
 
327
        tree.add("hello.txt")
328
328
        result = self.run_bzr("status --short")[0]
329
329
        self.assertContainsRe(result, "[+]N  hello.txt\n")
330
330
 
331
 
        self.run_bzr("commit -m added")
 
331
        tree.commit(message="added")
332
332
        result = self.run_bzr("status --short -r 0..1")[0]
333
333
        self.assertContainsRe(result, "[+]N  hello.txt\n")
334
334
 
340
340
        self.assertEquals(result2, result)
341
341
 
342
342
    def test_status_versioned(self):
343
 
        self.run_bzr("init")
 
343
        tree = self.make_branch_and_tree('.')
344
344
 
345
345
        self.build_tree(['hello.txt'])
346
346
        result = self.run_bzr("status --versioned")[0]
347
347
        self.assertNotContainsRe(result, "unknown:\n  hello.txt\n")
348
348
 
349
 
        self.run_bzr("add hello.txt")
 
349
        tree.add("hello.txt")
350
350
        result = self.run_bzr("status --versioned")[0]
351
351
        self.assertContainsRe(result, "added:\n  hello.txt\n")
352
352
 
353
 
        self.run_bzr("commit -m added")
 
353
        tree.commit("added")
354
354
        result = self.run_bzr("status --versioned -r 0..1")[0]
355
355
        self.assertContainsRe(result, "added:\n  hello.txt\n")
356
356