~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Robert Collins
  • Date: 2006-06-11 11:44:47 UTC
  • mfrom: (1762 +trunk)
  • mto: (1767.2.2 integration)
  • mto: This revision was merged to the branch mainline in revision 1769.
  • Revision ID: robertc@robertcollins.net-20060611114447-ba56b7e27a72c941
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
680
680
            test_suite_factory=factory)
681
681
        self.assertEqual([True], factory_called)
682
682
 
683
 
    def test_run_bzr_subprocess(self):
 
683
    def test_run_bzr_external(self):
684
684
        """The run_bzr_helper_external comand behaves nicely."""
685
 
        result = self.run_bzr_subprocess('--version')
686
 
        result = self.run_bzr_subprocess('--version', retcode=None)
 
685
        result = self.run_bzr_external('--version')
687
686
        self.assertContainsRe(result[0], 'is free software')
688
 
        self.assertRaises(AssertionError, self.run_bzr_subprocess, 
689
 
                          '--versionn')
690
 
        result = self.run_bzr_subprocess('--versionn', retcode=3)
691
 
        result = self.run_bzr_subprocess('--versionn', retcode=None)
 
687
        self.assertRaises(AssertionError, self.run_bzr_external, '--versionn')
 
688
        result = self.run_bzr_external('--versionn', retcode=3)
692
689
        self.assertContainsRe(result[1], 'unknown command')
693
 
        err = self.run_bzr_subprocess('merge', '--merge-type', 'magic merge', 
694
 
                                      retcode=3)[1]
 
690
        err = self.run_bzr_external('merge --merge-type "magic merge"', 
 
691
                                    retcode=3)[1]
 
692
        self.assertContainsRe(err, 'No known merge type magic merge')
 
693
        err = self.run_bzr_external('merge', '--merge-type', 'magic merge', 
 
694
                                    retcode=3)[1]
695
695
        self.assertContainsRe(err, 'No known merge type magic merge')