~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2011-05-10 07:46:15 UTC
  • mfrom: (5844 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5845.
  • Revision ID: jelmer@samba.org-20110510074615-eptod049ndjxc4i7
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
        register_command(cmd_echo_exact)
55
55
        try:
56
56
            self.assertEqual('foo', bzr('echo-exact foo'))
57
 
            # This is cheating a little bit, because 'foo\xb5' shouldn't
58
 
            # get past main()
59
 
            self.assertEqual('foo\xb5', bzr('echo-exact foo\xb5'))
60
57
            # Exact should fail to decode the string
61
58
            self.assertRaises(UnicodeEncodeError,
62
59
                bzr,
63
60
                ['echo-exact', u'foo\xb5'])
 
61
            # Previously a non-ascii bytestring was also tested, as 'exact'
 
62
            # outputs bytes untouched, but needed buggy argv parsing to work
64
63
        finally:
65
64
            plugin_cmds.remove('echo-exact')
66
65