summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2012-03-13 12:18:19 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2012-03-13 12:18:19 (GMT)
commit69437da15fb4f626290af0d60bf8d90c5869b828 (patch)
tree82bbf5f5ad9daf4d80e8b1f750a2f9b6a2c29063 /Lib
parent27f48979cafa9b955fcb45eed273ccb72ba35201 (diff)
parent47b5ddb9cf0f3e278b54309756d08e79ef76b3a8 (diff)
downloadcpython-69437da15fb4f626290af0d60bf8d90c5869b828.zip
cpython-69437da15fb4f626290af0d60bf8d90c5869b828.tar.gz
cpython-69437da15fb4f626290af0d60bf8d90c5869b828.tar.bz2
Merged upstream change.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_cgi.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_cgi.py b/Lib/test/test_cgi.py
index 9951e93..3031fb3 100644
--- a/Lib/test/test_cgi.py
+++ b/Lib/test/test_cgi.py
@@ -118,6 +118,11 @@ def gen_result(data, environ):
class CgiTests(unittest.TestCase):
+ def test_escape(self):
+ self.assertEqual("test &amp; string", cgi.escape("test & string"))
+ self.assertEqual("&lt;test string&gt;", cgi.escape("<test string>"))
+ self.assertEqual("&quot;test string&quot;", cgi.escape('"test string"', True))
+
def test_strict(self):
for orig, expect in parse_strict_test_cases:
# Test basic parsing