aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Fontaine2015-03-16 23:21:05 +0100
committerTim D. Smith2015-03-16 15:54:49 -0700
commit19d1066d0c8fe42b973ffd2eee3385cdb7220829 (patch)
treeaf49913e4912d7f90add35b6a628c7166a005b7c
parent97a8fbd5a3f8031bbabe98dc4c563c617ec80a61 (diff)
downloadhomebrew-19d1066d0c8fe42b973ffd2eee3385cdb7220829.tar.bz2
falcon: test added
Closes #37773. Signed-off-by: Tim D. Smith <git@tim-smith.us>
-rw-r--r--Library/Formula/falcon.rb46
1 files changed, 30 insertions, 16 deletions
diff --git a/Library/Formula/falcon.rb b/Library/Formula/falcon.rb
index 57e43804f..931361f12 100644
--- a/Library/Formula/falcon.rb
+++ b/Library/Formula/falcon.rb
@@ -1,37 +1,38 @@
-require 'formula'
-
class Falcon < Formula
- homepage 'http://www.falconpl.org/'
- url 'http://falconpl.org/project_dl/_official_rel/Falcon-0.9.6.8.tgz'
- sha1 '8720096a8257e8bf370e3f0a072b5600d7575f64'
+ homepage "http://www.falconpl.org/"
+ url "http://falconpl.org/project_dl/_official_rel/Falcon-0.9.6.8.tgz"
+ sha256 "f4b00983e7f91a806675d906afd2d51dcee048f12ad3af4b1dadd92059fa44b9"
+
+ head "http://git.falconpl.org/falcon.git"
- head 'http://git.falconpl.org/falcon.git'
+ option "with-editline", "Use editline instead of readline"
+ option "with-feathers", "Include feathers (extra libraries)"
- option 'editline', "Use editline instead of readline"
- option 'feathers', "Include feathers (extra libraries)"
+ deprecated_option "editline" => "with-editline"
+ deprecated_option "feathers" => "with-feathers"
- depends_on 'cmake' => :build
- depends_on 'pcre'
+ depends_on "cmake" => :build
+ depends_on "pcre"
- conflicts_with 'sdl',
+ conflicts_with "sdl",
:because => "Falcon optionally depends on SDL and then the build breaks. Fix it!"
def install
- args = std_cmake_args + %W{
+ args = std_cmake_args + %W[
-DCMAKE_INSTALL_PREFIX=#{prefix}
-DFALCON_BIN_DIR=#{bin}
-DFALCON_LIB_DIR=#{lib}
-DFALCON_MAN_DIR=#{man1}
-DFALCON_WITH_INTERNAL_PCRE=OFF
- -DFALCON_WITH_MANPAGES=ON}
+ -DFALCON_WITH_MANPAGES=ON]
- if build.include? 'editline'
+ if build.include? "editline"
args << "-DFALCON_WITH_EDITLINE=ON"
else
args << "-DFALCON_WITH_EDITLINE=OFF"
end
- if build.include? 'feathers'
+ if build.include? "feathers"
args << "-DFALCON_WITH_FEATHERS=feathers"
else
args << "-DFALCON_WITH_FEATHERS=NO"
@@ -39,6 +40,19 @@ class Falcon < Formula
system "cmake", *args
system "make"
- system "make install"
+ system "make", "install"
+ end
+
+ test do
+ (testpath/"test").write <<-EOS.undent
+ looper = .[brigade
+ .[{ val, text => oob( [val+1, "Changed"] ) }
+ { val, text => val < 10 ? oob(1): "Homebrew" }]]
+ final = looper( 1, "Original" )
+ > "Final value is: ", final
+ EOS
+
+ assert_match(/Final value is: Homebrew/,
+ shell_output("#{bin}/falcon test").chomp)
end
end