~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Tarmac
  • Author(s): Vincent Ladeuil
  • Date: 2017-01-30 14:42:05 UTC
  • mfrom: (6620.1.1 trunk)
  • Revision ID: tarmac-20170130144205-r8fh2xpmiuxyozpv
Merge  2.7 into trunk including fix for bug #1657238 [r=vila]

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