mò
v
Lc @ s d Z d Z d Z d Z d k Z d k Z e i i e i i e i d ƒ ƒ Z
e i i e
ƒ d Z e e i j o e i i
d e ƒ n e i i e ƒ d Z d k Z d k l Z d k Td Z d e i f d
„ ƒ YZ d e i f d „ ƒ YZ d
„ Z e d j o e i ƒ n d S( s $Id$s' Joseph Walton s
$Revision$s Copyright (c) 2004 Joseph WaltonNi ( s xmlEncoding( t *s application/xmlt
TestDecodec B sb t Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
d
„ Z RS( Nc C sm | i | d d ƒ | i t | ƒ t d t t | ƒ ƒ d ƒ | i t | ƒ t d ƒ | i | | ƒ d S( Ns% Decoded strings should not equal Nones' Decoded strings should be Unicode (was t )s. Test suite error: test strings must be Unicode( t selft assertNotEqualt at Nonet assertEqualt typet unicodet strt b( R R R ( ( tF /web/script/rubys/feedvalidator.org/src/tests/testXmlEncodingDecode.pyt _assertEqualUnicode s -c C s¬ g } t i t d d | ƒ \ } } | i d | ƒ | i | d ƒ | i | g ƒ g } t i t d d | ƒ \ } } | i d | ƒ | i | d ƒ | i | g ƒ d S( Ns UTF-8s u s* u* (
t loggedEventst xmlEncodingt decodet ctAXt encodingt decodedR t assertEqualsR
R ( R R R R ( ( R t testProvidedEncoding s c C s` g } | i t i t d d | ƒ d d ƒ | i t | ƒ d ƒ | i | d i t d ƒ d S( Ns iÿÿÿÿi i s+ Must warn if there's no clue as to encoding(
R R R R R R R t lent __class__t MissingEncoding( R R ( ( R t testNoDeclarationOrBOM* s &c C sX g } t i t d d | ƒ \ } } | i | d ƒ | i | d ƒ | i | g ƒ d S( Ns* s utf-8u* (
R R R R R R R R R R
( R R R R ( ( R t testJustDeclaration8 s
c C s` g } | i t i t d d | ƒ d d ƒ | i t | ƒ d ƒ | i | d i t d ƒ d S( Ns X-FAKEs iÿÿÿÿi i s( Must fail if an unknown encoding is used(
R R R R R R R R R t UnknownEncoding( R R ( ( R t testSupplyUnknownEncoding? s &c C sT g } | i t i t d d | ƒ d d ƒ | i | ƒ | i | d i t ƒ d S( Ns+ iÿÿÿÿ(
R R R R R R R t assert_R R ( R R ( ( R t testDeclareUnknownEncodingE s &
c C sT g } | i t i t d d | ƒ d d ƒ | i | ƒ | i | d i t ƒ d S( Ns US-ASCIIs* iÿÿÿÿu* ( R R R R R R R R t EncodingMismatch( R R ( ( R t testWarnMismatchK s &
c C s@ g } | i t i t d d | ƒ d d ƒ | i | g ƒ d S( Ns utf-8s £iÿÿÿÿu £( R R R R R R ( R R ( ( R t testDecodeUTF8Q s &c C sT g } | i t i t d d | ƒ d d ƒ | i | ƒ | i | d i t ƒ d S( s7 Ensure bad UTF-8 is flagged as such, but still decoded.s utf-8s £iÿÿÿÿu
�N( R R R R R R R R t UnicodeError( R R ( ( R t testDecodeBadUTF8V s
&
c C s@ g } | i t i t d d | ƒ d d ƒ | i | g ƒ d S( sA Make sure the initial BOM signature is not in the decoded string.s UTF-16s
ÿþ<