--lines option to echo_stdout.rb/echo_stdout.rb

for new tests wanting several lines
This commit is contained in:
Johan Holmberg 2016-06-28 09:02:33 +02:00
parent 1b80605f49
commit 8943e46c44
2 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,9 @@
#!/usr/bin/ruby
STDERR.puts ARGV.join(" ")
if ARGV.size > 0 && ARGV[0] == "--lines"
for arg in ARGV[1..-1]
STDERR.puts arg
end
else
STDERR.puts ARGV.join(" ")
end

View File

@ -1,3 +1,9 @@
#!/usr/bin/ruby
puts ARGV.join(" ")
if ARGV.size > 0 && ARGV[0] == "--lines"
for arg in ARGV[1..-1]
puts arg
end
else
puts ARGV.join(" ")
end