Normalize whitespace. (quixote/test: test_html.py, ua_test.py)
Greg Ward <gward-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected]> Wed, 20 Nov 2002 14:43:25 -0500
| Newsgroups | gmane.comp.web.quixote.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /home/cvs/quixote/test
In directory hewson:/tmp/cvs-serv18744/test
Modified Files:
test_html.py ua_test.py
Log Message:
Normalize whitespace.
Index: test_html.py
===================================================================
RCS file: /home/cvs/quixote/test/test_html.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- test_html.py 15 Oct 2002 18:54:42 -0000 1.1
+++ test_html.py 20 Nov 2002 19:43:23 -0000 1.2
@@ -35,7 +35,7 @@
self.test_val("htmlescape(markupchars)", quotedchars)
self.test_val("htmltext.quote(markupchars)", quotedchars)
self.test_val("htmlescape(htmlescape(markupchars))", quotedchars)
-
+
def check_cmp (self):
s = htmltext("foo")
self.test_bool("s == 'foo'")
@@ -50,7 +50,7 @@
self.test_val("hash(htmltext('foo'))", hash('foo'))
self.test_val("hash(htmltext(markupchars))", hash(markupchars))
self.test_val("hash(htmlescape(markupchars))", hash(quotedchars))
-
+
def check_concat (self):
s = htmltext("foo")
self.test_val("s + 'bar'", "foobar")
@@ -62,7 +62,7 @@
def check_repeat (self):
self.test_val("htmltext('a') * 3", "aaa")
self.test_val("htmlescape(markupchars) * 3", quotedchars * 3)
-
+
def check_format (self):
self.test_val("htmltext('%s') % 'foo'", "foo")
self.test_val("htmltext('%s') % markupchars", quotedchars)
@@ -97,13 +97,13 @@
self.test_bool("htmlescape(markupchars).endswith(markupchars[-3:])")
self.test_bool("htmltext(markupchars).endswith("
" htmltext(markupchars[-3:]))")
-
+
def check_replace (self):
self.test_val("htmlescape('&').replace('&', 'foo')", "foo")
self.test_val("htmltext('&').replace(htmltext('&'), 'foo')", "foo")
self.test_val("htmltext('foo').replace('foo', htmltext('&'))", "&")
-
+
if __name__ == "__main__":
(scenarios, options) = parse_args()
Index: ua_test.py
===================================================================
RCS file: /home/cvs/quixote/test/ua_test.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ua_test.py 13 Sep 2001 20:36:55 -0000 1.1
+++ ua_test.py 20 Nov 2002 19:43:23 -0000 1.2
@@ -2,7 +2,7 @@
# Test Quixote's ability to parse the "User-Agent" header, ie.
# the 'guess_browser_version()' method of HTTPRequest.
-#
+#
# Reads User-Agent strings on stdin, and writes Quixote's interpretation
# of each on stdout. This is *not* an automated test!
@@ -27,4 +27,4 @@
else:
print "%s -> (%s, %s)" % (line, name, version)
-
+