8889841có ïúec@sõddlZddlZddlZyddlZejZWnddlZejZnXd„Zd„Zd„Zd„Z e dkrñej dƒeƒeƒeƒe ƒej ƒej dƒdkrÜd GHqñd ej dƒGHndS( iÿÿÿÿNcCsmtƒ}tj|dƒ}|jddƒ|jdƒ|jƒ|jƒdkridGHtjdƒndS(Ns ISO-8859-1itfootbartfoobarsFailed to save to StringIOi( tstr_iotlibxml2tcreateOutputBuffertwritet writeStringtclosetgetvaluetsystexit(tftbuf((sB/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/outbuf.pyttestSimpleBufferWrites s   cCsŸd}d}tƒ}tj|dƒ}tj|ƒ}|j|dƒ|jƒ|jƒ|kr›dGHdt|jƒƒGHdt|ƒGHtj dƒndS( s* Regression test for bug #154294. sHellos8 Hello sUTF-8s xmlDoc.saveFileTo() call failed.s got: %ss expected: %siN( RRRtparseDoct saveFileTotfreeDocR treprR R (tinputtexpectedR R tdoc((sB/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/outbuf.pyttestSaveDocToBuffers  cCs»d}d }tj|ƒ}xd D]‡}tƒ}tj|dƒ}|j|d|ƒ|jƒ||kr"dGHdt|jƒƒGHd t||ƒGHtjdƒq"q"W|j ƒdS( Ns/Some textsW Some text s^ Some text iisUTF-8s&xmlDoc.saveFormatFileTo() call failed.s got: %ss expected: %s(sW Some text s^ Some text (ii( RRRRtsaveFormatFileToR RR R R(RRRtiR R ((sB/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/outbuf.pyttestSaveFormattedDocToBuffer+s  cCsd}d}tƒ}tj|ƒ}tj|dƒ}|j|dƒ|jƒ|kr‘dGHdt|jƒƒGHdt|ƒGHtjdƒntƒ}tj|dƒ}|j |ddƒ|jƒ|kr dGHdt|jƒƒGHdt|ƒGHtjdƒn|j ƒd S( s˜ Similar to the previous two tests, except this time we invoke the save methods on the output buffer object and pass in an XML node object. sHellos8 Hello sUTF-8s&outputBuffer.saveFileTo() call failed.s got: %ss expected: %sis,outputBuffer.saveFormatFileTo() call failed.N( RRRRRR RR R RR(RRR RR ((sB/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/outbuf.pyttestSaveIntoOutputBufferDs(  t__main__iitOKsMemory leak %d bytes( R t setup_testRtStringIORtioRRRRt__name__t debugMemoryt cleanupParser(((sB/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/outbuf.pyts,