~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2011-03-15 07:54:39 UTC
  • mfrom: (0.38.5 trunk)
  • mto: This revision was merged to the branch mainline in revision 5726.
  • Revision ID: andrew.bennetts@canonical.com-20110315075439-nzm293joz143cx0k
Merge bzr-changelog-merge plugin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2006-2011 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
33
33
from bzrlib.tests import (
34
34
    probe_bad_non_ascii,
35
35
    TestSkipped,
 
36
    UnicodeFilenameFeature,
36
37
    )
37
38
from bzrlib.tests import TestCaseWithTransport
38
39
 
112
113
    def test_unicode_commit_message_is_filename(self):
113
114
        """Unicode commit message same as a filename (Bug #563646).
114
115
        """
 
116
        self.requireFeature(UnicodeFilenameFeature)
115
117
        file_name = u'\N{euro sign}'
116
118
        self.run_bzr(['init'])
117
119
        open(file_name, 'w').write('hello world')
717
719
            f = file('fed.bat', 'w')
718
720
            f.write('@rem dummy fed')
719
721
            f.close()
720
 
            osutils.set_or_unset_env('BZR_EDITOR', "fed.bat")
 
722
            self.overrideEnv('BZR_EDITOR', "fed.bat")
721
723
        else:
722
724
            f = file('fed.sh', 'wb')
723
725
            f.write('#!/bin/sh\n')
724
726
            f.close()
725
727
            os.chmod('fed.sh', 0755)
726
 
            osutils.set_or_unset_env('BZR_EDITOR', "./fed.sh")
 
728
            self.overrideEnv('BZR_EDITOR', "./fed.sh")
727
729
 
728
730
    def setup_commit_with_template(self):
729
731
        self.setup_editor()
754
756
        os.chdir('foo')
755
757
        open('foo.txt', 'w').write('hello')
756
758
        self.run_bzr(['add'])
757
 
        osutils.set_or_unset_env('EMAIL', None)
758
 
        osutils.set_or_unset_env('BZR_EMAIL', None)
 
759
        self.overrideEnv('EMAIL', None)
 
760
        self.overrideEnv('BZR_EMAIL', None)
759
761
        out, err = self.run_bzr(['commit', '-m', 'initial'], 3)
760
762
        self.assertContainsRe(err, 'Unable to determine your name')
761
763