accept '-' as input filename to read data for checking from standard input #128

Merged
merged 1 commit into from Dec 9, 2012
View
@@ -1178,6 +1178,9 @@ def __init__(self, filename, lines=None,
if filename is None:
self.filename = 'stdin'
self.lines = lines or []
+ elif filename == '-':
+ self.filename = 'stdin'
+ self.lines = stdin_get_value().splitlines(True)
elif lines is None:
try:
self.lines = readlines(filename)