blob: 245efb3133e2b49dd340e80f33de22fadab9278f [file] [log] [blame]
Jeremy Hylton6102e292000-08-31 15:48:10 +00001# Minimal test of the quote function
2import urllib
3
4chars = 'abcdefghijklmnopqrstuvwxyz'\
5 '\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356' \
6 '\357\360\361\362\363\364\365\366\370\371\372\373\374\375\376\377' \
7 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' \
8 '\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317' \
9 '\320\321\322\323\324\325\326\330\331\332\333\334\335\336'
10
11expected = 'abcdefghijklmnopqrstuvwxyz%df%e0%e1%e2%e3%e4%e5%e6%e7%e8%e9%ea%eb%ec%ed%ee%ef%f0%f1%f2%f3%f4%f5%f6%f8%f9%fa%fb%fc%fd%fe%ffABCDEFGHIJKLMNOPQRSTUVWXYZ%c0%c1%c2%c3%c4%c5%c6%c7%c8%c9%ca%cb%cc%cd%ce%cf%d0%d1%d2%d3%d4%d5%d6%d8%d9%da%db%dc%dd%de'
12
13test = urllib.quote(chars)
14assert test == expected, "urllib.quote problem"