minirst: read test input from stdin
authorMartin Geisler <mg@aragost.com>
Thu, 26 May 2011 10:46:34 +0200
changeset 14433 7658221da551
parent 14432 0969d91fad5c
child 14434 cc8c09855d19
minirst: read test input from stdin
mercurial/minirst.py
--- a/mercurial/minirst.py	Thu May 26 11:11:34 2011 +0200
+++ b/mercurial/minirst.py	Thu May 26 10:46:34 2011 +0200
@@ -467,10 +467,10 @@
         print
         return blocks
 
-    text = util.readfile(sys.argv[1])
+    text = sys.stdin.read()
     blocks = debug(findblocks, text)
     blocks = debug(findliteralblocks, blocks)
-    blocks, pruned = debug(prunecontainers, blocks, sys.argv[2:])
+    blocks, pruned = debug(prunecontainers, blocks, sys.argv[1:])
     blocks = debug(inlineliterals, blocks)
     blocks = debug(splitparagraphs, blocks)
     blocks = debug(updatefieldlists, blocks)