add --stdout/stderr option to lines.rb

to make it easier to generate test output
on both stdout and stderr
This commit is contained in:
Johan Holmberg 2016-11-18 15:05:49 +01:00
parent 67a662f1c6
commit b18b462328

@ -1,6 +1,14 @@
#!/usr/bin/ruby
for line in ARGV
puts line
end
out = STDOUT
for line in ARGV
case line
when "--stdout"
out = STDOUT
when "--stderr"
out = STDERR
else
out.puts(line)
end
end