From 5059444af1b97570f995c837e30a54067e4cf95d Mon Sep 17 00:00:00 2001
From: Johan Holmberg <holmberg556@gmail.com>
Date: Tue, 24 Mar 2009 08:47:54 +0000
Subject: [PATCH] add scripts needed for 'rake test'

---
 t/bin/cat.rb   | 5 +++++
 t/bin/echo.rb  | 3 +++
 t/bin/exit.rb  | 3 +++
 t/bin/false.rb | 3 +++
 t/bin/lines.rb | 6 ++++++
 t/bin/rm.rb    | 6 ++++++
 t/bin/sleep.rb | 4 ++++
 t/bin/touch.rb | 8 ++++++++
 t/bin/true.rb  | 3 +++
 9 files changed, 41 insertions(+)
 create mode 100755 t/bin/cat.rb
 create mode 100755 t/bin/echo.rb
 create mode 100755 t/bin/exit.rb
 create mode 100755 t/bin/false.rb
 create mode 100755 t/bin/lines.rb
 create mode 100755 t/bin/rm.rb
 create mode 100755 t/bin/sleep.rb
 create mode 100755 t/bin/touch.rb
 create mode 100755 t/bin/true.rb

diff --git a/t/bin/cat.rb b/t/bin/cat.rb
new file mode 100755
index 0000000..c9dc1b0
--- /dev/null
+++ b/t/bin/cat.rb
@@ -0,0 +1,5 @@
+#!/usr/bin/ruby
+
+for file in ARGV
+  puts File.read(file)
+end
diff --git a/t/bin/echo.rb b/t/bin/echo.rb
new file mode 100755
index 0000000..a1545d7
--- /dev/null
+++ b/t/bin/echo.rb
@@ -0,0 +1,3 @@
+#!/usr/bin/ruby
+
+puts ARGV.join(" ")
diff --git a/t/bin/exit.rb b/t/bin/exit.rb
new file mode 100755
index 0000000..59f741c
--- /dev/null
+++ b/t/bin/exit.rb
@@ -0,0 +1,3 @@
+#!/usr/bin/ruby
+
+exit ARGV[0].to_i
diff --git a/t/bin/false.rb b/t/bin/false.rb
new file mode 100755
index 0000000..a2fdfd1
--- /dev/null
+++ b/t/bin/false.rb
@@ -0,0 +1,3 @@
+#!/usr/bin/ruby
+
+exit 1
diff --git a/t/bin/lines.rb b/t/bin/lines.rb
new file mode 100755
index 0000000..2d4765e
--- /dev/null
+++ b/t/bin/lines.rb
@@ -0,0 +1,6 @@
+#!/usr/bin/ruby
+
+for line in ARGV
+    puts line
+end
+
diff --git a/t/bin/rm.rb b/t/bin/rm.rb
new file mode 100755
index 0000000..15c6756
--- /dev/null
+++ b/t/bin/rm.rb
@@ -0,0 +1,6 @@
+#!/usr/bin/ruby
+
+for file in ARGV
+  File.unlink file
+end
+
diff --git a/t/bin/sleep.rb b/t/bin/sleep.rb
new file mode 100755
index 0000000..3990ef4
--- /dev/null
+++ b/t/bin/sleep.rb
@@ -0,0 +1,4 @@
+#!/usr/bin/ruby
+
+sleep ARGV[0].to_i
+
diff --git a/t/bin/touch.rb b/t/bin/touch.rb
new file mode 100755
index 0000000..7a2c648
--- /dev/null
+++ b/t/bin/touch.rb
@@ -0,0 +1,8 @@
+#!/usr/bin/ruby
+
+require "fileutils"
+
+for file in ARGV
+    FileUtils.touch(file)
+end
+
diff --git a/t/bin/true.rb b/t/bin/true.rb
new file mode 100755
index 0000000..accc951
--- /dev/null
+++ b/t/bin/true.rb
@@ -0,0 +1,3 @@
+#!/usr/bin/ruby
+
+exit 0