~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Pool
  • Date: 2008-10-27 08:02:47 UTC
  • mfrom: (3795 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3798.
  • Revision ID: mbp@sourcefrog.net-20081027080247-0al6nrx2v8u1dcci
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
                bzr,
63
63
                ['echo-exact', u'foo\xb5'])
64
64
        finally:
65
 
            plugin_cmds.pop('echo-exact')
 
65
            plugin_cmds.remove('echo-exact')
66
66
 
67
67
    def test_strict_utf8(self):
68
68
        def bzr(*args, **kwargs):
75
75
            self.assertEqual(u'foo\xb5'.encode('utf-8'),
76
76
                             bzr(['echo-strict', u'foo\xb5']))
77
77
        finally:
78
 
            plugin_cmds.pop('echo-strict')
 
78
            plugin_cmds.remove('echo-strict')
79
79
 
80
80
    def test_strict_ascii(self):
81
81
        def bzr(*args, **kwargs):
90
90
                bzr,
91
91
                ['echo-strict', u'foo\xb5'])
92
92
        finally:
93
 
            plugin_cmds.pop('echo-strict')
 
93
            plugin_cmds.remove('echo-strict')
94
94
 
95
95
    def test_replace_utf8(self):
96
96
        def bzr(*args, **kwargs):
103
103
            self.assertEqual(u'foo\xb5'.encode('utf-8'),
104
104
                             bzr(['echo-replace', u'foo\xb5']))
105
105
        finally:
106
 
            plugin_cmds.pop('echo-replace')
 
106
            plugin_cmds.remove('echo-replace')
107
107
 
108
108
    def test_replace_ascii(self):
109
109
        def bzr(*args, **kwargs):
116
116
            # ascii can't encode \xb5
117
117
            self.assertEqual('foo?', bzr(['echo-replace', u'foo\xb5']))
118
118
        finally:
119
 
            plugin_cmds.pop('echo-replace')
 
119
            plugin_cmds.remove('echo-replace')
120
120
 
121
121