[KoCo-CVS] [Commit] cjkcodecs/tests test_encoding_shift_jisx0213.py test_multibytecodec_support.py
Brought to you by:
perky
From: Hye-Shik C. <pe...@us...> - 2003-07-12 15:06:11
|
perky 03/07/12 08:06:10 Modified: tests test_encoding_shift_jisx0213.py test_multibytecodec_support.py Log: SHIFT-JISX0213 can encode « and » Revision Changes Path 1.2 +5 -1 cjkcodecs/tests/test_encoding_shift_jisx0213.py Index: test_encoding_shift_jisx0213.py =================================================================== RCS file: /cvsroot/koco/cjkcodecs/tests/test_encoding_shift_jisx0213.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- test_encoding_shift_jisx0213.py 12 Jul 2003 12:42:48 -0000 1.1 +++ test_encoding_shift_jisx0213.py 12 Jul 2003 15:06:09 -0000 1.2 @@ -27,7 +27,7 @@ # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # -# $Id: test_encoding_shift_jisx0213.py,v 1.1 2003/07/12 12:42:48 perky Exp $ +# $Id: test_encoding_shift_jisx0213.py,v 1.2 2003/07/12 15:06:09 perky Exp $ # from test import test_support @@ -47,6 +47,10 @@ # sjis vs cp932 ("\\\x7e", "replace", u"\xa5\u203e"), ("\x81\x5f\x81\x61\x81\x7c", "replace", u"\x5c\u2016\u2212"), + ) + xmlcharnametest = ( + u"\xab\u211c\xbb = \u2329\u1234\u232a", + "\x85Gℜ\x85Q = ⟨ሴ⟩" ) def test_main(): 1.8 +7 -3 cjkcodecs/tests/test_multibytecodec_support.py Index: test_multibytecodec_support.py =================================================================== RCS file: /cvsroot/koco/cjkcodecs/tests/test_multibytecodec_support.py,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- test_multibytecodec_support.py 12 Jul 2003 13:52:01 -0000 1.7 +++ test_multibytecodec_support.py 12 Jul 2003 15:06:09 -0000 1.8 @@ -27,7 +27,7 @@ # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # -# $Id: test_multibytecodec_support.py,v 1.7 2003/07/12 13:52:01 perky Exp $ +# $Id: test_multibytecodec_support.py,v 1.8 2003/07/12 15:06:09 perky Exp $ # import sys, codecs, os.path @@ -42,6 +42,7 @@ errortests = None # must set. error test tuple roundtriptest = 1 # set if roundtrip is possible with unicode has_iso10646 = 0 # set if this encoding contains whole iso10646 map + xmlcharnametest = None # string to test xmlcharrefreplace def setUp(self): if self.codec is None: @@ -106,8 +107,11 @@ codecs.register_error( "test.xmlcharnamereplace", xmlcharnamereplace) - sin = u"\xab\u211c\xbb = \u2329\u1234\u232a" - sout = "«ℜ» = ⟨ሴ⟩" + if self.xmlcharnametest: + sin, sout = self.xmlcharnametest + else: + sin = u"\xab\u211c\xbb = \u2329\u1234\u232a" + sout = "«ℜ» = ⟨ሴ⟩" self.assertEqual(self.encode(sin, "test.xmlcharnamereplace")[0], sout) |