aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorSecond Planet2011-11-05 19:40:21 -0400
committerAdam Vandenberg2012-02-25 10:19:59 -0800
commit8a4cb8c0acda73dae4234caeaeaa3a24eeb7b56c (patch)
treecd5351f2ab055ce7b908aadd437a58c32f4facd7 /Library/Homebrew/test
parent5d1db0e934b906ed6e84bcd53b4e24fb0c48424c (diff)
downloadbrew-8a4cb8c0acda73dae4234caeaeaa3a24eeb7b56c.tar.bz2
Add more external dep options
* Chicken Scheme * Node.js * Rubinius Closes Homebrew/homebrew#8466. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_external_deps.rb75
1 files changed, 75 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_external_deps.rb b/Library/Homebrew/test/test_external_deps.rb
index 052617712..ae41ccc7c 100644
--- a/Library/Homebrew/test/test_external_deps.rb
+++ b/Library/Homebrew/test/test_external_deps.rb
@@ -73,6 +73,54 @@ class GoodJRubyBall <TestBall
end
end
+class BadChickenBall <TestBall
+ depends_on "notapackage" => :chicken
+
+ def initialize name=nil
+ super "uses_chicken_ball"
+ end
+end
+
+class GoodChickenBall <TestBall
+ depends_on "extras" => :chicken
+
+ def initialize name=nil
+ super "uses_chicken_ball"
+ end
+end
+
+class BadRubiniusBall <TestBall
+ depends_on "notapackage" => :rbx
+
+ def initialize name=nil
+ super "uses_rubinius_ball"
+ end
+end
+
+class GoodRubiniusBall <TestBall
+ depends_on "date" => :rbx
+
+ def intialize
+ super "uses_rubinius_ball"
+ end
+end
+
+class BadNodeBall <TestBall
+ depends_on "notapackage" => :node
+
+ def initialize
+ super "uses_node_ball"
+ end
+end
+
+class GoodNodeBall <TestBall
+ depends_on "util" => :node
+
+ def initialize
+ super "uses_node_balls"
+ end
+end
+
class ExternalDepsTests < Test::Unit::TestCase
def check_deps_fail f
@@ -120,4 +168,31 @@ class ExternalDepsTests < Test::Unit::TestCase
def test_good_jruby_deps
check_deps_pass GoodJRubyBall unless `/usr/bin/which jruby`.chomp.empty?
end
+
+ # Only run these next two tests if rubinius is installed.
+ def test_bad_rubinius_deps
+ check_deps_fail BadRubiniusBall unless `/usr/bin/which rbx`.chomp.empty?
+ end
+
+ def test_good_rubinius_deps
+ check_deps_pass GoodRubiniusBall unless `/usr/bin/which rbx`.chomp.empty?
+ end
+
+ # Only run these next two tests if chicken scheme is installed.
+ def test_bad_chicken_deps
+ check_deps_fail BadChickenBall unless `/usr/bin/which csc`.chomp.empty?
+ end
+
+ def test_good_chicken_deps
+ check_deps_pass GoodChickenBall unless `/usr/bin/which csc`.chomp.empty?
+ end
+
+ # Only run these next two tests if node.js is installed.
+ def test_bad_node_deps
+ check_deps_fail BadNodeBall unless `/usr/bin/which node`.chomp.empty?
+ end
+
+ def test_good_node_deps
+ check_deps_pass GoodNodeBall unless `/usr/bin/which node`.chomp.empty?
+ end
end