diff tests/doctest.txt @ 6:0cd69fa6751c

add test for decomposition; stub diff, will have to move to 2-tuples to do this properly
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 27 Jun 2011 07:16:46 -0700
parents 6b99523536ee
children b02420253bfd
line wrap: on
line diff
--- a/tests/doctest.txt	Fri Jun 17 10:52:29 2011 -0700
+++ b/tests/doctest.txt	Mon Jun 27 07:16:46 2011 -0700
@@ -20,6 +20,12 @@
     >>> sorted(matcher.match('example')) # -> example.*
     ['http://www.example.com/foo/bar/fleem', 'http://www.example.com/foo/blah', 'https://www.example.com/foo/', 'https://www.example.net/foo/']
 
+Test decomposition::
+   
+    >>> matcher = UrlMatcher()
+    >>> sorted(matcher.decompose('http://www.example.com/foo').items())
+    [('domain', ['example', 'com', 'www']), ('path', ['foo']), ('scheme', 'http')]
+
 Test url diffs::
 
     >>> matcher = UrlMatcher()