File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ def main():
107
107
wp .color_threshold = options .grey_level
108
108
109
109
if len (args ) < 1 :
110
- source = os . getcwd () + " /stdin"
110
+ source = "/dev /stdin"
111
111
else :
112
112
source = args [0 ]
113
113
if not os .path .exists (source ):
Original file line number Diff line number Diff line change @@ -67,6 +67,14 @@ def test_clear_cache(self):
67
67
None , None )
68
68
self .assertFalse (os .path .exists ('Temp/cache/reference.RFC.1847.xml' ))
69
69
70
+ def test_stdin (self ):
71
+ process = subprocess .Popen ([sys .executable , test_program ],
72
+ stdin = subprocess .PIPE ,
73
+ stderr = subprocess .PIPE )
74
+ _ , stderr_data = process .communicate (input = b"<svvvvvg/>" )
75
+ self .assertEqual (stderr_data .decode ("utf-8" ).strip (),
76
+ 'INFO: File conforms to SVG requirements.' )
77
+
70
78
71
79
class TestParserMethods (unittest .TestCase ):
72
80
You can’t perform that action at this time.
0 commit comments