# Path: tornado/util.py
# def b(s):
#     return s.encode('latin1')
# 
# Path: tornado/test/util.py



import tornado.escape
from tornado.escape import utf8, xhtml_escape, xhtml_unescape, url_escape, url_unescape, to_unicode, json_decode, json_encode
from tornado.util import b
from tornado.test.util import unittest
    # as did too many dots at the end
    ("http://url.com/withmany.......................................", {},
     u'<a href="http://url.com/withmany">http://url.com/withmany</a>.......................................'),

    ("http://url.com/withmany((((((((((((((((((((((((((((((((((a)", {},
     u'<a href="http://url.com/withmany">http://url.com/withmany</a>((((((((((((((((((((((((((((((((((a)'),

    # some examples from http://daringfireball.net/2009/11/liberal_regex_for_matching_urls
    # plus a fex extras (such as multiple parentheses).
    ("http://foo.com/blah_blah", {},
     u'<a href="http://foo.com/blah_blah">http://foo.com/blah_blah</a>'),

    ("http://foo.com/blah_blah/", {},
     u'<a href="http://foo.com/blah_blah/">http://foo.com/blah_blah/</a>'),

    ("(Something like http://foo.com/blah_blah)", {},
     u'(Something like <a href="http://foo.com/blah_blah">http://foo.com/blah_blah</a>)'),

    ("http://foo.com/blah_blah_(wikipedia)", {},
     u'<a href="http://foo.com/blah_blah_(wikipedia)">http://foo.com/blah_blah_(wikipedia)</a>'),

    ("http://foo.com/blah_(blah)_(wikipedia)_blah", {},
     u'<a href="http://foo.com/blah_(blah)_(wikipedia)_blah">http://foo.com/blah_(blah)_(wikipedia)_blah</a>'),

    ("(Something like http://foo.com/blah_blah_(wikipedia))", {},
     u'(Something like <a href="http://foo.com/blah_blah_(wikipedia)">http://foo.com/blah_blah_(wikipedia)</a>)'),

    ("http://foo.com/blah_blah.", {},
     u'<a href="http://foo.com/blah_blah">http://foo.com/blah_blah</a>.'),


# Path: tornado/util.py
# def b(s):
#     return s.encode('latin1')
# 
# Path: tornado/test/util.py



# Path: tornado/test/escape_test.py
import tornado.escape
from tornado.escape import utf8, xhtml_escape, xhtml_unescape, url_escape, url_unescape, to_unicode, json_decode, json_encode
from tornado.util import b
from tornado.test.util import unittest

    # as did too many dots at the end
    ("http://url.com/withmany.......................................", {},
     u'<a href="http://url.com/withmany">http://url.com/withmany</a>.......................................'),

    ("http://url.com/withmany((((((((((((((((((((((((((((((((((a)", {},
     u'<a href="http://url.com/withmany">http://url.com/withmany</a>((((((((((((((((((((((((((((((((((a)'),

    # some examples from http://daringfireball.net/2009/11/liberal_regex_for_matching_urls
    # plus a fex extras (such as multiple parentheses).
    ("http://foo.com/blah_blah", {},
     u'<a href="http://foo.com/blah_blah">http://foo.com/blah_blah</a>'),

    ("http://foo.com/blah_blah/", {},
     u'<a href="http://foo.com/blah_blah/">http://foo.com/blah_blah/</a>'),

    ("(Something like http://foo.com/blah_blah)", {},
     u'(Something like <a href="http://foo.com/blah_blah">http://foo.com/blah_blah</a>)'),

    ("http://foo.com/blah_blah_(wikipedia)", {},
     u'<a href="http://foo.com/blah_blah_(wikipedia)">http://foo.com/blah_blah_(wikipedia)</a>'),

    ("http://foo.com/blah_(blah)_(wikipedia)_blah", {},
     u'<a href="http://foo.com/blah_(blah)_(wikipedia)_blah">http://foo.com/blah_(blah)_(wikipedia)_blah</a>'),

    ("(Something like http://foo.com/blah_blah_(wikipedia))", {},
     u'(Something like <a href="http://foo.com/blah_blah_(wikipedia)">http://foo.com/blah_blah_(wikipedia)</a>)'),

    ("http://foo.com/blah_blah.", {},
     u'<a href="http://foo.com/blah_blah">http://foo.com/blah_blah</a>.'),


    ("http://foo.com/blah_blah/.", {},