/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_xml.py

  • Committer: Jelmer Vernooij
  • Date: 2011-03-10 13:52:27 UTC
  • mto: (5712.4.5 bzrdir-weave)
  • mto: This revision was merged to the branch mainline in revision 5716.
  • Revision ID: jelmer@samba.org-20110310135227-ufcw0utlwsp8r6k6
Revert registry changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005-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
23
23
    xml6,
24
24
    xml7,
25
25
    xml8,
26
 
    serializer,
27
26
    )
28
27
from bzrlib.tests import TestCase
29
 
from bzrlib.inventory import Inventory, InventoryEntry
 
28
from bzrlib.inventory import Inventory
30
29
from bzrlib.xml4 import serializer_v4
31
30
import bzrlib.xml5
32
31
 
580
579
        uni_str = u'\xb5\xe5&\u062c'
581
580
        self.assertEqual('µå&ج"',
582
581
                         bzrlib.xml8._encode_and_escape(uni_str))
 
582
 
 
583
 
 
584
class TestMisc(TestCase):
 
585
 
 
586
    def test_unescape_xml(self):
 
587
        """We get some kind of error when malformed entities are passed"""
 
588
        self.assertRaises(KeyError, bzrlib.xml8._unescape_xml, 'foo&bar;')