Skip to content
This repository
Browse code

Be more explicit about paths in test methods

  • Loading branch information...
commit 0271b146952409e35ba2cf64c1206ba3693b4aa7 1 parent c45f083
Adam Vandenberg authored September 01, 2011
2  Library/Formula/aamath.rb
@@ -15,6 +15,6 @@ def install
15 15
   end
16 16
 
17 17
   def test
18  
-    system "cat #{prefix}/testcases | aamath"
  18
+    system "cat #{prefix}/testcases | #{bin}/aamath"
19 19
   end
20 20
 end
2  Library/Formula/asciitex.rb
@@ -13,6 +13,6 @@ def install
13 13
   end
14 14
 
15 15
   def test
16  
-    system "asciiTeX -f #{prefix}/EXAMPLES"
  16
+    system "#{bin}/asciiTeX -f #{prefix}/EXAMPLES"
17 17
   end
18 18
 end
2  Library/Formula/clisp.rb
@@ -50,6 +50,6 @@ def install
50 50
   end
51 51
 
52 52
   def test
53  
-    system "clisp --version"
  53
+    system "#{bin}/clisp --version"
54 54
   end
55 55
 end
2  Library/Formula/cliweather.rb
@@ -10,6 +10,6 @@ def install
10 10
   end
11 11
 
12 12
   def test
13  
-    system "cliweather 98027"
  13
+    system "#{bin}/cliweather 98027"
14 14
   end
15 15
 end
2  Library/Formula/clojure.rb
@@ -37,6 +37,6 @@ def caveats; <<-EOS.undent
37 37
   end
38 38
 
39 39
   def test
40  
-    system "clj -e \"(println \\\"Hello World\\\")\""
  40
+    system "#{bin}/clj -e \"(println \\\"Hello World\\\")\""
41 41
   end
42 42
 end
4  Library/Formula/erlang.rb
@@ -87,12 +87,12 @@ def install
87 87
   end
88 88
 
89 89
   def test
90  
-    `erl -noshell -eval 'crypto:start().' -s init stop`
  90
+    `#{bin}/erl -noshell -eval 'crypto:start().' -s init stop`
91 91
 
92 92
     # This test takes some time to run, but per bug #120 should finish in
93 93
     # "less than 20 minutes". It takes a few minutes on a Mac Pro (2009).
94 94
     if ARGV.include? "--time"
95  
-      `dialyzer --build_plt -r #{lib}/erlang/lib/kernel-2.14.1/ebin/`
  95
+      `#{bin}/dialyzer --build_plt -r #{lib}/erlang/lib/kernel-2.14.1/ebin/`
96 96
     end
97 97
   end
98 98
 end
2  Library/Formula/figlet.rb
@@ -38,6 +38,6 @@ def install
38 38
   end
39 39
 
40 40
   def test
41  
-    system "figlet -f larry3d hello, figlet"
  41
+    system "#{bin}/figlet -f larry3d hello, figlet"
42 42
   end
43 43
 end
2  Library/Formula/gource.rb
@@ -30,7 +30,7 @@ def install
30 30
 
31 31
   def test
32 32
     Dir.chdir HOMEBREW_REPOSITORY do
33  
-      system "gource"
  33
+      system "#{bin}/gource"
34 34
     end
35 35
   end
36 36
 end
2  Library/Formula/gtk+.rb
@@ -24,6 +24,6 @@ def install
24 24
   end
25 25
 
26 26
   def test
27  
-    system "gtk-demo"
  27
+    system "#{bin}/gtk-demo"
28 28
   end
29 29
 end
2  Library/Formula/jruby.rb
@@ -38,6 +38,6 @@ def caveats; <<-EOS.undent
38 38
   end
39 39
 
40 40
   def test
41  
-    system "jruby -e 'puts \"hello\"'"
  41
+    system "#{bin}/jruby -e 'puts \"hello\"'"
42 42
   end
43 43
 end
2  Library/Formula/luarocks.rb
@@ -44,7 +44,7 @@ def caveats; <<-EOS.undent
44 44
 
45 45
   def test
46 46
     opoo "Luarocks test script installs 'lpeg'"
47  
-    system "luarocks install lpeg"
  47
+    system "#{bin}/luarocks install lpeg"
48 48
     system "lua", "-llpeg", "-e", 'print ("Hello World!")'
49 49
   end
50 50
 end
2  Library/Formula/stanford-parser.rb
@@ -22,6 +22,6 @@ def install
22 22
   end
23 23
 
24 24
   def test
25  
-    system "lexparser.csh", "#{libexec}/testsent.txt"
  25
+    system "#{bin}/lexparser.csh", "#{libexec}/testsent.txt"
26 26
   end
27 27
 end
2  Library/Formula/unifdef.rb
@@ -13,6 +13,6 @@ def install
13 13
   end
14 14
 
15 15
   def test
16  
-    system "echo '' | unifdef"
  16
+    system "echo '' | #{bin}/unifdef"
17 17
   end
18 18
 end
2  Library/Formula/vala.rb
@@ -17,6 +17,6 @@ def install
17 17
   end
18 18
 
19 19
   def test
20  
-    system "valac --version"
  20
+    system "#{bin}/valac --version"
21 21
   end
22 22
 end
9  Library/Formula/zint.rb
@@ -6,7 +6,7 @@ class Zint < Formula
6 6
   md5 '2b47caff88cb746f212d6a0497185358'
7 7
   head 'git://zint.git.sourceforge.net/gitroot/zint/zint'
8 8
 
9  
-  depends_on 'cmake'
  9
+  depends_on 'cmake' => :build
10 10
 
11 11
   def install
12 12
     mkdir 'zint-build'
@@ -16,8 +16,9 @@ def install
16 16
   end
17 17
 
18 18
   def test
19  
-    system "zint -o test-zing.png -d 'This Text'"
20  
-    system "open test-zing.png"
21  
-    puts "You may want to `rm test-zing.png`"
  19
+    mktemp do
  20
+      system "#{bin}/zint -o test-zing.png -d 'This Text'"
  21
+      system "/usr/bin/open test-zing.png && sleep 3"
  22
+    end
22 23
   end
23 24
 end

0 notes on commit 0271b14

Please sign in to comment.
Something went wrong with that request. Please try again.