From f49bd4a9faebb1ced63b5483d069cbabe78885d5 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Wed, 23 Sep 2009 10:35:36 -0700 Subject: [PATCH] Add test for matching formula filename/class. --- Library/Homebrew/formula_test.rb | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 Library/Homebrew/formula_test.rb diff --git a/Library/Homebrew/formula_test.rb b/Library/Homebrew/formula_test.rb new file mode 100755 index 0000000000..d61fa113e7 --- /dev/null +++ b/Library/Homebrew/formula_test.rb @@ -0,0 +1,43 @@ +#!/usr/bin/ruby +# This software is in the public domain, furnished "as is", without technical +# support, and with no warranty, express or implied, as to its usefulness for +# any purpose. + +$:.unshift File.dirname(__FILE__) +require 'test/unit' +require 'global' +require 'pathname+yeast' +require 'formula' +require 'utils' + +require 'ARGV+yeast' # needs to be after test/unit to avoid conflict with OptionsParser + + +# NOTE duplicated in unittest.rb (we need to refactor the tests anyway) +def nostdout + if ARGV.include? '-V' + yield + end + begin + require 'stringio' + tmpo=$stdout + tmpe=$stderr + $stdout=StringIO.new + yield + ensure + $stdout=tmpo + end +end + + +class FormulaNames