ó
X¾÷Xc           @   sŽ   d  Z  y d d l Z Wn e k
 r5 d d l Z n Xd d l m Z d d d d g Z d e j f d „  ƒ  YZ e	 d k rŠ e j
 ƒ  n  d S(   s(   Tests for google.protobuf.text_encoding.iÿÿÿÿN(   t   text_encodings   foo\rbar\nbaz\ts   foobar
baz	s"   \'full of \"sound\" and \"fury\"\'s   'full of "sound" and "fury"'s   signi\\fying\\ nothing\\s   signi\fying\ nothing\s   \010\t\n\013\014\rs	   \t\n\rs   	
t   TextEncodingTestCasec           B   s   e  Z d  „  Z d „  Z RS(   c         C   s\   xU t  D]M \ } } } |  j | t j | d t ƒƒ |  j | t j | d t ƒƒ q Wd  S(   Nt   as_utf8(   t   TEST_VALUESt   assertEqualR    t   CEscapet   Falset   True(   t   selft   escapedt   escaped_utf8t	   unescaped(    (    sM   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/text_encoding_test.pyt   testCEscape:   s
    		c         C   sP   xI t  D]A \ } } } |  j | t j | ƒ ƒ |  j | t j | ƒ ƒ q Wd  S(   N(   R   R   R    t	   CUnescape(   R   R	   R
   R   (    (    sM   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/text_encoding_test.pyt   testCUnescapeA   s    (   t   __name__t
   __module__R   R   (    (    (    sM   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/text_encoding_test.pyR   9   s   	t   __main__(   s   foo\rbar\nbaz\ts   foo\rbar\nbaz\ts   foobar
baz	(   s"   \'full of \"sound\" and \"fury\"\'s"   \'full of \"sound\" and \"fury\"\'s   'full of "sound" and "fury"'(   s   signi\\fying\\ nothing\\s   signi\\fying\\ nothing\\s   signi\fying\ nothing\(   s   \010\t\n\013\014\rs	   \t\n\rs   	
(   t   __doc__t	   unittest2t   unittestt   ImportErrort   google.protobufR    R   t   TestCaseR   R   t   main(    (    (    sM   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/text_encoding_test.pyt   <module>!   s(           	