/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 breezy/git/tests/test_blackbox.py

  • Committer: Jelmer Vernooij
  • Date: 2019-01-01 21:38:07 UTC
  • mfrom: (7228 work)
  • mto: This revision was merged to the branch mainline in revision 7233.
  • Revision ID: jelmer@jelmer.uk-20190101213807-ay6uqghz0nnrgjvx
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
from .. import (
36
36
    tests,
37
37
    )
 
38
from ...tests.features import PluginLoadedFeature
38
39
 
39
40
 
40
41
class TestGitBlackBox(ExternalBase):
63
64
        self.simple_commit()
64
65
        output, error = self.run_bzr(['info'])
65
66
        self.assertEqual(error, '')
66
 
        self.assertTrue("Standalone tree (format: git)" in output)
 
67
        self.assertEqual(
 
68
            output,
 
69
            'Standalone tree (format: git)\n'
 
70
            'Location:\n'
 
71
            '            light checkout root: .\n'
 
72
            '  checkout of co-located branch: master\n')
67
73
 
68
74
    def test_ignore(self):
69
75
        self.simple_commit()
380
386
class GrepTests(ExternalBase):
381
387
 
382
388
    def test_simple_grep(self):
 
389
        self.requireFeature(PluginLoadedFeature('grep'))
383
390
        tree = self.make_branch_and_tree('.', format='git')
384
391
        self.build_tree_contents([('a', 'text for a\n')])
385
392
        tree.add(['a'])
386
393
        output, error = self.run_bzr('grep text')
387
394
        self.assertEqual(output, 'a:text for a\n')
388
395
        self.assertEqual(error, '')
 
396
 
 
397
 
 
398
class StatusTests(ExternalBase):
 
399
 
 
400
    def test_empty_dir(self):
 
401
        tree = self.make_branch_and_tree('.', format='git')
 
402
        self.build_tree(['a/', 'a/foo'])
 
403
        self.build_tree_contents([('.gitignore', 'foo\n')])
 
404
        tree.add(['.gitignore'])
 
405
        tree.commit('add ignore')
 
406
        output, error = self.run_bzr('st')
 
407
        self.assertEqual(output, '')
 
408
        self.assertEqual(error, '')
 
409
 
 
410
 
 
411
class StatsTests(ExternalBase):
 
412
 
 
413
    def test_simple_stats(self):
 
414
        self.requireFeature(PluginLoadedFeature('stats'))
 
415
        tree = self.make_branch_and_tree('.', format='git')
 
416
        self.build_tree_contents([('a', 'text for a\n')])
 
417
        tree.add(['a'])
 
418
        tree.commit('a commit', committer='Somebody <somebody@example.com>')
 
419
        output, error = self.run_bzr('stats')
 
420
        self.assertEqual(output, '   1 Somebody <somebody@example.com>\n')