Skip to content

Commit

Permalink
Be more explicit about paths in test methods
Browse files Browse the repository at this point in the history
  • Loading branch information
adamv committed Sep 1, 2011
1 parent 3e3a193 commit 742fe1b
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Formula/aamath.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ def install
end

def test
system "cat #{prefix}/testcases | aamath"
system "cat #{prefix}/testcases | #{bin}/aamath"
end
end
2 changes: 1 addition & 1 deletion Formula/asciitex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ def install
end

def test
system "asciiTeX -f #{prefix}/EXAMPLES"
system "#{bin}/asciiTeX -f #{prefix}/EXAMPLES"
end
end
2 changes: 1 addition & 1 deletion Formula/clisp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ def install
end

def test
system "clisp --version"
system "#{bin}/clisp --version"
end
end
2 changes: 1 addition & 1 deletion Formula/cliweather.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ def install
end

def test
system "cliweather 98027"
system "#{bin}/cliweather 98027"
end
end
2 changes: 1 addition & 1 deletion Formula/clojure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ def caveats; <<-EOS.undent
end

def test
system "clj -e \"(println \\\"Hello World\\\")\""
system "#{bin}/clj -e \"(println \\\"Hello World\\\")\""
end
end
4 changes: 2 additions & 2 deletions Formula/erlang.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ def install
end

def test
`erl -noshell -eval 'crypto:start().' -s init stop`
`#{bin}/erl -noshell -eval 'crypto:start().' -s init stop`

# This test takes some time to run, but per bug #120 should finish in
# "less than 20 minutes". It takes a few minutes on a Mac Pro (2009).
if ARGV.include? "--time"
`dialyzer --build_plt -r #{lib}/erlang/lib/kernel-2.14.1/ebin/`
`#{bin}/dialyzer --build_plt -r #{lib}/erlang/lib/kernel-2.14.1/ebin/`
end
end
end
2 changes: 1 addition & 1 deletion Formula/figlet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ def install
end

def test
system "figlet -f larry3d hello, figlet"
system "#{bin}/figlet -f larry3d hello, figlet"
end
end
2 changes: 1 addition & 1 deletion Formula/gource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def install

def test
Dir.chdir HOMEBREW_REPOSITORY do
system "gource"
system "#{bin}/gource"
end
end
end
2 changes: 1 addition & 1 deletion Formula/gtk+.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ def install
end

def test
system "gtk-demo"
system "#{bin}/gtk-demo"
end
end
2 changes: 1 addition & 1 deletion Formula/jruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ def caveats; <<-EOS.undent
end

def test
system "jruby -e 'puts \"hello\"'"
system "#{bin}/jruby -e 'puts \"hello\"'"
end
end
2 changes: 1 addition & 1 deletion Formula/luarocks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def caveats; <<-EOS.undent

def test
opoo "Luarocks test script installs 'lpeg'"
system "luarocks install lpeg"
system "#{bin}/luarocks install lpeg"
system "lua", "-llpeg", "-e", 'print ("Hello World!")'
end
end
Expand Down
2 changes: 1 addition & 1 deletion Formula/stanford-parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ def install
end

def test
system "lexparser.csh", "#{libexec}/testsent.txt"
system "#{bin}/lexparser.csh", "#{libexec}/testsent.txt"
end
end
2 changes: 1 addition & 1 deletion Formula/unifdef.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ def install
end

def test
system "echo '' | unifdef"
system "echo '' | #{bin}/unifdef"
end
end
2 changes: 1 addition & 1 deletion Formula/vala.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ def install
end

def test
system "valac --version"
system "#{bin}/valac --version"
end
end
9 changes: 5 additions & 4 deletions Formula/zint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Zint < Formula
md5 '2b47caff88cb746f212d6a0497185358'
head 'git://zint.git.sourceforge.net/gitroot/zint/zint'

depends_on 'cmake'
depends_on 'cmake' => :build

def install
mkdir 'zint-build'
Expand All @@ -16,8 +16,9 @@ def install
end

def test
system "zint -o test-zing.png -d 'This Text'"
system "open test-zing.png"
puts "You may want to `rm test-zing.png`"
mktemp do
system "#{bin}/zint -o test-zing.png -d 'This Text'"
system "/usr/bin/open test-zing.png && sleep 3"
end
end
end

0 comments on commit 742fe1b

Please sign in to comment.