add scripts needed for 'rake test'

This commit is contained in:
Johan Holmberg 2009-03-24 08:47:54 +00:00 committed by holmberg556
parent 2c61efb00d
commit 5059444af1
9 changed files with 41 additions and 0 deletions

5
t/bin/cat.rb Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/ruby
for file in ARGV
puts File.read(file)
end

3
t/bin/echo.rb Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/ruby
puts ARGV.join(" ")

3
t/bin/exit.rb Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/ruby
exit ARGV[0].to_i

3
t/bin/false.rb Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/ruby
exit 1

6
t/bin/lines.rb Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/ruby
for line in ARGV
puts line
end

6
t/bin/rm.rb Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/ruby
for file in ARGV
File.unlink file
end

4
t/bin/sleep.rb Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/ruby
sleep ARGV[0].to_i

8
t/bin/touch.rb Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/ruby
require "fileutils"
for file in ARGV
FileUtils.touch(file)
end

3
t/bin/true.rb Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/ruby
exit 0