changeset 14433:7658221da551

minirst: read test input from stdin
author Martin Geisler <mg@aragost.com>
date Thu, 26 May 2011 10:46:34 +0200
parents 0969d91fad5c
children cc8c09855d19
files mercurial/minirst.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)