/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Parth Malwankar
  • Date: 2010-04-19 13:04:30 UTC
  • mfrom: (5165 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5166.
  • Revision ID: parth.malwankar@gmail.com-20100419130430-njvxdaka6xbqwvjw
merged in trunk and moved NEWS entry to right location.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2005-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
472
472
        self.assertEqual("working tree is out of date, run 'bzr update'\n",
473
473
                         err)
474
474
 
 
475
    def test_status_on_ignored(self):
 
476
        """Tests branch status on an unversioned file which is considered ignored.
 
477
 
 
478
        See https://bugs.launchpad.net/bzr/+bug/40103
 
479
        """
 
480
        tree = self.make_branch_and_tree('.')
 
481
 
 
482
        self.build_tree(['test1.c', 'test1.c~', 'test2.c~'])
 
483
        result = self.run_bzr('status')[0]
 
484
        self.assertContainsRe(result, "unknown:\n  test1.c\n")
 
485
        short_result = self.run_bzr('status --short')[0]
 
486
        self.assertContainsRe(short_result, "\?   test1.c\n")
 
487
 
 
488
        result = self.run_bzr('status test1.c')[0]
 
489
        self.assertContainsRe(result, "unknown:\n  test1.c\n")
 
490
        short_result = self.run_bzr('status --short test1.c')[0]
 
491
        self.assertContainsRe(short_result, "\?   test1.c\n")
 
492
 
 
493
        result = self.run_bzr('status test1.c~')[0]
 
494
        self.assertContainsRe(result, "ignored:\n  test1.c~\n")
 
495
        short_result = self.run_bzr('status --short test1.c~')[0]
 
496
        self.assertContainsRe(short_result, "I   test1.c~\n")
 
497
 
 
498
        result = self.run_bzr('status test1.c~ test2.c~')[0]
 
499
        self.assertContainsRe(result, "ignored:\n  test1.c~\n  test2.c~\n")
 
500
        short_result = self.run_bzr('status --short test1.c~ test2.c~')[0]
 
501
        self.assertContainsRe(short_result, "I   test1.c~\nI   test2.c~\n")
 
502
 
 
503
        result = self.run_bzr('status test1.c test1.c~ test2.c~')[0]
 
504
        self.assertContainsRe(result, "unknown:\n  test1.c\nignored:\n  test1.c~\n  test2.c~\n")
 
505
        short_result = self.run_bzr('status --short test1.c test1.c~ test2.c~')[0]
 
506
        self.assertContainsRe(short_result, "\?   test1.c\nI   test1.c~\nI   test2.c~\n")
 
507
 
475
508
    def test_status_write_lock(self):
476
509
        """Test that status works without fetching history and
477
510
        having a write lock.