diff examples/doctest.txt @ 39:a2cdce0108e1

get directory substitution sorta working; start stubbing mixed case
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 01 Jan 2011 23:00:59 -0800
parents 9739212a63c3
children 6b4c8f23192f
line wrap: on
line diff
--- a/examples/doctest.txt	Sat Jan 01 22:34:29 2011 -0800
+++ b/examples/doctest.txt	Sat Jan 01 23:00:59 2011 -0800
@@ -42,6 +42,18 @@
     >>> template = makeitso.PolyTemplate([exampledir], output=tempdir, interactive=False)
     >>> sorted(template.missing())
     ['bar', 'foo', 'subdir']
-    >>> template.substitute(foo='myfoo', bar='mybar', subdir='mysubdir')
-    >>> os.listdir(tempdir)
-    
+    >>> template.substitute(foo='It', bar='life', subdir='mysubdir')
+    >>> sorted(os.listdir(tempdir))
+    ['foo.txt', 'mysubdir']
+    >>> file(os.path.join(tempdir, 'foo.txt')).read().strip()
+    'It is a wonderful life'
+    >>> os.listdir(os.path.join(tempdir, 'mysubdir'))
+    ['life.txt']
+    >>> file(os.path.join(tempdir, 'mysubdir', 'life.txt')).read().strip()
+    'It'
+    >>> shutil.rmtree(tempdir)
+
+Mixed case:
+
+    >>> template = makeitso.PolyTemplate([example, exampledir])
+