summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_cgi.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_cgi.py')
-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 & 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